Skip to content

Commit fc96b43

Browse files
authored
Merge pull request #3824 from alphagov/samsimpson1/tfvars-small
Use tfvars files for all rds workspaces
2 parents 19087ca + 62cbc70 commit fc96b43

5 files changed

Lines changed: 1071 additions & 22 deletions

File tree

terraform/deployments/tfc-configuration/rds.tf

Lines changed: 36 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,18 @@ module "rds-integration" {
4545
module "rds-staging" {
4646
source = "github.com/alphagov/terraform-govuk-tfe-workspacer"
4747

48-
organization = var.organization
49-
workspace_name = "rds-staging"
50-
workspace_desc = "This module manages AWS resources for creating RDS databases."
51-
workspace_tags = ["staging", "rds", "eks", "aws"]
52-
terraform_version = var.terraform_version
53-
execution_mode = "remote"
54-
working_directory = "/terraform/deployments/rds/"
55-
trigger_patterns = ["/terraform/deployments/rds/**/*"]
48+
organization = var.organization
49+
workspace_name = "rds-staging"
50+
workspace_desc = "This module manages AWS resources for creating RDS databases."
51+
workspace_tags = ["staging", "rds", "eks", "aws"]
52+
terraform_version = var.terraform_version
53+
execution_mode = "remote"
54+
working_directory = "/terraform/deployments/rds/"
55+
trigger_patterns = [
56+
"/terraform/deployments/rds/**/*",
57+
"/terraform/variables/staging/common.tfvars",
58+
"/terraform/variables/staging/rds.tfvars"
59+
]
5660
global_remote_state = true
5761

5862
project_name = "govuk-infrastructure"
@@ -71,24 +75,31 @@ module "rds-staging" {
7175
TF_CLI_ARGS_apply = "-parallelism=30"
7276
}
7377

78+
tfvars_files = [
79+
"staging/common.tfvars",
80+
"staging/rds.tfvars"
81+
]
82+
7483
variable_set_ids = [
75-
local.aws_credentials["staging"],
76-
module.variable-set-staging.id,
77-
module.variable-set-rds-staging.id
84+
local.aws_credentials["staging"]
7885
]
7986
}
8087

8188
module "rds-production" {
8289
source = "github.com/alphagov/terraform-govuk-tfe-workspacer"
8390

84-
organization = var.organization
85-
workspace_name = "rds-production"
86-
workspace_desc = "This module manages AWS resources for creating RDS databases."
87-
workspace_tags = ["production", "rds", "eks", "aws"]
88-
terraform_version = var.terraform_version
89-
execution_mode = "remote"
90-
working_directory = "/terraform/deployments/rds/"
91-
trigger_patterns = ["/terraform/deployments/rds/**/*"]
91+
organization = var.organization
92+
workspace_name = "rds-production"
93+
workspace_desc = "This module manages AWS resources for creating RDS databases."
94+
workspace_tags = ["production", "rds", "eks", "aws"]
95+
terraform_version = var.terraform_version
96+
execution_mode = "remote"
97+
working_directory = "/terraform/deployments/rds/"
98+
trigger_patterns = [
99+
"/terraform/deployments/rds/**/*",
100+
"/terraform/variables/production/common.tfvars",
101+
"/terraform/variables/production/rds.tfvars"
102+
]
92103
global_remote_state = true
93104

94105
project_name = "govuk-infrastructure"
@@ -107,9 +118,12 @@ module "rds-production" {
107118
TF_CLI_ARGS_apply = "-parallelism=30"
108119
}
109120

121+
tfvars_files = [
122+
"production/common.tfvars",
123+
"production/rds.tfvars"
124+
]
125+
110126
variable_set_ids = [
111-
local.aws_credentials["production"],
112-
module.variable-set-production.id,
113-
module.variable-set-rds-production.id
127+
local.aws_credentials["production"]
114128
]
115129
}
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
govuk_aws_state_bucket = "govuk-terraform-steppingstone-production"
2+
cluster_infrastructure_state_bucket = "govuk-terraform-production"
3+
4+
cluster_version = "1.34" # Don't forget to change this in variables-test.tf too
5+
cluster_log_retention_in_days = 731
6+
7+
vpc_cidr = "10.13.0.0/16"
8+
9+
eks_control_plane_subnets = {
10+
a = { az = "eu-west-1a", cidr = "10.13.19.0/28" }
11+
b = { az = "eu-west-1b", cidr = "10.13.19.16/28" }
12+
c = { az = "eu-west-1c", cidr = "10.13.19.32/28" }
13+
}
14+
15+
eks_public_subnets = {
16+
a = { az = "eu-west-1a", cidr = "10.13.20.0/24" }
17+
b = { az = "eu-west-1b", cidr = "10.13.21.0/24" }
18+
c = { az = "eu-west-1c", cidr = "10.13.22.0/24" }
19+
}
20+
21+
eks_private_subnets = {
22+
a = { az = "eu-west-1a", cidr = "10.13.24.0/22" }
23+
b = { az = "eu-west-1b", cidr = "10.13.28.0/22" }
24+
c = { az = "eu-west-1c", cidr = "10.13.32.0/22" }
25+
}
26+
27+
legacy_private_subnets = {
28+
a = { az = "eu-west-1a", cidr = "10.13.4.0/24", nat = true }
29+
b = { az = "eu-west-1b", cidr = "10.13.5.0/24", nat = true }
30+
c = { az = "eu-west-1c", cidr = "10.13.6.0/24", nat = true }
31+
32+
rds_a = { az = "eu-west-1a", cidr = "10.13.10.0/24", nat = false }
33+
rds_b = { az = "eu-west-1b", cidr = "10.13.11.0/24", nat = false }
34+
rds_c = { az = "eu-west-1c", cidr = "10.13.12.0/24", nat = false }
35+
36+
elasticache_a = { az = "eu-west-1a", cidr = "10.13.7.0/24", nat = false }
37+
elasticache_b = { az = "eu-west-1b", cidr = "10.13.8.0/24", nat = false }
38+
elasticache_c = { az = "eu-west-1c", cidr = "10.13.9.0/24", nat = false }
39+
40+
elasticsearch_a = { az = "eu-west-1a", cidr = "10.13.16.0/24", nat = false }
41+
elasticsearch_b = { az = "eu-west-1b", cidr = "10.13.17.0/24", nat = false }
42+
elasticsearch_c = { az = "eu-west-1c", cidr = "10.13.18.0/24", nat = false }
43+
}
44+
45+
govuk_environment = "production"
46+
47+
enable_kube_state_metrics = false
48+
49+
enable_arm_workers_blue = false
50+
enable_arm_workers_green = true
51+
enable_x86_workers = false
52+
53+
publishing_service_domain = "publishing.service.gov.uk"
54+
55+
56+
frontend_memcached_node_type = "cache.r6g.large"
57+
58+
ckan_s3_organogram_bucket = "datagovuk-production-ckan-organogram"
59+
60+
shared_documentdb_identifier_suffix = "-1"

0 commit comments

Comments
 (0)