diff --git a/terraform/deployments/tfc-configuration/variables-integration.tf b/terraform/deployments/tfc-configuration/variables-integration.tf index 608816ce0..f43d8727f 100644 --- a/terraform/deployments/tfc-configuration/variables-integration.tf +++ b/terraform/deployments/tfc-configuration/variables-integration.tf @@ -9,6 +9,8 @@ module "variable-set-integration" { cluster_version = 1.29 cluster_log_retention_in_days = 7 + vpc_cidr = "10.1.0.0/16" + eks_control_plane_subnets = { a = { az = "eu-west-1a", cidr = "10.1.19.0/28" } b = { az = "eu-west-1b", cidr = "10.1.19.16/28" } diff --git a/terraform/deployments/tfc-configuration/variables-production.tf b/terraform/deployments/tfc-configuration/variables-production.tf index 5b2b96bc9..5858b7c43 100644 --- a/terraform/deployments/tfc-configuration/variables-production.tf +++ b/terraform/deployments/tfc-configuration/variables-production.tf @@ -9,6 +9,8 @@ module "variable-set-production" { cluster_version = 1.29 cluster_log_retention_in_days = 7 + vpc_cidr = "10.13.0.0/16" + eks_control_plane_subnets = { a = { az = "eu-west-1a", cidr = "10.13.19.0/28" } b = { az = "eu-west-1b", cidr = "10.13.19.16/28" } diff --git a/terraform/deployments/tfc-configuration/variables-staging.tf b/terraform/deployments/tfc-configuration/variables-staging.tf index 0fd60e08e..529d61fbe 100644 --- a/terraform/deployments/tfc-configuration/variables-staging.tf +++ b/terraform/deployments/tfc-configuration/variables-staging.tf @@ -9,6 +9,8 @@ module "variable-set-staging" { cluster_version = 1.29 cluster_log_retention_in_days = 7 + vpc_cidr = "10.12.0.0/16" + eks_control_plane_subnets = { a = { az = "eu-west-1a", cidr = "10.12.19.0/28" } b = { az = "eu-west-1b", cidr = "10.12.19.16/28" } diff --git a/terraform/deployments/tfc-configuration/vpc.tf b/terraform/deployments/tfc-configuration/vpc.tf new file mode 100644 index 000000000..21b176c99 --- /dev/null +++ b/terraform/deployments/tfc-configuration/vpc.tf @@ -0,0 +1,93 @@ +module "vpc-integration" { + source = "alexbasista/workspacer/tfe" + version = "0.9.0" + + organization = var.organization + workspace_name = "vpc-integration" + workspace_desc = "The vpc module is responsible for the AWS resources which constitute the EKS cluster." + workspace_tags = ["integration", "vpc", "eks", "aws"] + terraform_version = "1.7.0" + execution_mode = "remote" + working_directory = "/terraform/deployments/vpc/" + trigger_patterns = ["/terraform/deployments/vpc/**/*"] + + project_name = "govuk-infrastructure" + vcs_repo = { + identifier = "alphagov/govuk-infrastructure" + branch = "samsimpson1/govuk-aws" + oauth_token_id = data.tfe_oauth_client.github.oauth_token_id + } + + team_access = { + "GOV.UK Non-Production" = "write" + "GOV.UK Production" = "write" + } + + variable_set_names = [ + "aws-credentials-integration", + "common", + "common-integration" + ] +} + +module "vpc-staging" { + source = "alexbasista/workspacer/tfe" + version = "0.9.0" + + organization = var.organization + workspace_name = "vpc-staging" + workspace_desc = "The vpc module is responsible for the AWS resources which constitute the EKS cluster." + workspace_tags = ["staging", "vpc", "eks", "aws"] + terraform_version = "1.7.0" + execution_mode = "remote" + working_directory = "/terraform/deployments/vpc/" + trigger_patterns = ["/terraform/deployments/vpc/**/*"] + + project_name = "govuk-infrastructure" + vcs_repo = { + identifier = "alphagov/govuk-infrastructure" + branch = "samsimpson1/govuk-aws" + oauth_token_id = data.tfe_oauth_client.github.oauth_token_id + } + + team_access = { + "GOV.UK Production" = "write" + } + + variable_set_names = [ + "aws-credentials-staging", + "common", + "common-staging" + ] +} + +module "vpc-production" { + source = "alexbasista/workspacer/tfe" + version = "0.9.0" + + organization = var.organization + workspace_name = "vpc-production" + workspace_desc = "The vpc module is responsible for the AWS resources which constitute the EKS cluster." + workspace_tags = ["production", "vpc", "eks", "aws"] + terraform_version = "1.7.0" + execution_mode = "remote" + working_directory = "/terraform/deployments/vpc/" + trigger_patterns = ["/terraform/deployments/vpc/**/*"] + + project_name = "govuk-infrastructure" + vcs_repo = { + identifier = "alphagov/govuk-infrastructure" + branch = "samsimpson1/govuk-aws" + oauth_token_id = data.tfe_oauth_client.github.oauth_token_id + } + + team_access = { + "GOV.UK Production" = "write" + } + + variable_set_names = [ + "aws-credentials-production", + "common", + "common-production" + ] +}