-
Notifications
You must be signed in to change notification settings - Fork 25
/
variables.tf
177 lines (147 loc) · 5.97 KB
/
variables.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
variable "govuk_aws_state_bucket" {
type = string
description = "The name of the S3 bucket used for govuk-aws's Terraform state files."
}
variable "cluster_log_retention_in_days" {
type = number
description = "Number of days to retain cluster log events in CloudWatch."
}
variable "cluster_name" {
type = string
description = "Name for the EKS cluster."
default = "govuk"
}
variable "cluster_version" {
type = string
description = "Kubernetes release version for the cluster, e.g. 1.21"
}
variable "eks_control_plane_subnets" {
type = map(object({ az = string, cidr = string }))
description = "Map of {subnet_name: {az=<az>, cidr=<cidr>}} for the public subnets for the EKS cluster's apiserver."
}
variable "eks_private_subnets" {
type = map(object({ az = string, cidr = string }))
description = "Map of {subnet_name: {az=<az>, cidr=<cidr>}} for the private subnets for the EKS cluster's nodes and pods."
}
variable "eks_public_subnets" {
type = map(object({ az = string, cidr = string }))
description = "Map of {subnet_name: {az=<az>, cidr=<cidr>}} for the public subnets where the EKS cluster will create Internet-facing load balancers."
}
variable "external_dns_subdomain" {
type = string
description = "Subdomain name for a Route53 zone which will be created underneath external_root_zone (e.g. 'eks' to be created underneath staging.govuk.digital), for use by the external-dns addon. external-dns will create records for ALBs/NLBs created by Ingresses and Service[type=LoadBalancer] in this zone."
default = "eks"
}
variable "publishing_service_domain" {
type = string
description = "FQDN of the user-facing domain for the publishing apps, e.g. staging.publishing.service.gov.uk. This domain is included as a wildcard SAN on the TLS cert for Ingresses etc."
}
variable "force_destroy" {
type = bool
description = "Setting for force_destroy on resources such as Route53 zones. For use in non-production environments to allow for automated tear-down."
default = false
}
variable "enable_arm_workers" {
type = bool
description = "Whether to enable the ARM/Graviton-based Managed Node Group"
default = false
}
variable "arm_workers_instance_types" {
type = list(string)
description = "List of ARM-based instance types for the managed node group, in order of preference. The second and subsequent preferences are only relevant when using spot instances."
default = ["m7g.4xlarge", "m6g.4xlarge", "m7g.2xlarge", "m6g.2xlarge"]
}
variable "arm_workers_default_capacity_type" {
type = string
description = "Default capacity type for ARM-based managed node groups: SPOT or ON_DEMAND."
default = "ON_DEMAND"
}
variable "arm_workers_size_desired" {
type = number
description = "Desired capacity of ARM-based managed node autoscale group."
default = 6
}
variable "arm_workers_size_min" {
type = number
description = "Min capacity of ARM-based managed node autoscale group."
default = 3
}
variable "arm_workers_size_max" {
type = number
description = "Max capacity of ARM-based managed node autoscale group."
default = 12
}
variable "workers_instance_types" {
type = list(string)
description = "List of instance types for the managed node group, in order of preference. The second and subsequent preferences are only relevant when using spot instances."
default = ["m6i.4xlarge", "m6a.4xlarge", "m6i.2xlarge", "m6a.2xlarge"]
}
variable "workers_default_capacity_type" {
type = string
description = "Default capacity type for managed node groups: SPOT or ON_DEMAND."
default = "ON_DEMAND"
}
variable "workers_size_desired" {
type = number
description = "Desired capacity of managed node autoscale group."
default = 6
}
variable "workers_size_min" {
type = number
description = "Min capacity of managed node autoscale group."
default = 3
}
variable "workers_size_max" {
type = number
description = "Max capacity of managed node autoscale group."
default = 12
}
variable "node_disk_size" {
type = number
description = "Size in GB of the node default volume"
default = 60
}
variable "grafana_db_min_capacity" {
type = number
description = "Minimum capacity of the Grafana RDS Aurora Serverless database."
default = 2
}
variable "grafana_db_max_capacity" {
type = number
description = "Maximum capacity of the Grafana RDS Aurora Serverless database."
default = 8
}
variable "grafana_db_auto_pause" {
type = bool
description = "Whether to auto-scale the Grafana RDS database to zero when it's idle. Takes 30s to start up again when traffic arrives. Best avoided in production."
default = false
}
variable "grafana_db_seconds_until_auto_pause" {
type = number
description = "The timeout after which an idle Grafana RDS instance gets scaled down to zero, if grafana_db_auto_pause is true."
default = 7200
}
variable "rds_apply_immediately" {
type = bool
description = "If true, apply changes to RDS instances immediately instead of scheduling them for the next maintenance window."
default = false
}
variable "rds_backup_retention_period" {
type = number
description = "Backup retention period for Grafana config database, in days."
default = 7
}
variable "rds_skip_final_snapshot" {
type = bool
description = "If true, allow deletion of RDS instances via Terraform by removing the requirement for a final snapshot to be taken on deletion. Do not enable this in production."
default = false
}
variable "secrets_recovery_window_in_days" {
type = number
description = "Set to 0 in non-production environments to allow Terraform to delete and re-create secrets in AWS Secrets Manager."
default = 7
}
variable "govuk_environment" {
type = string
description = "Acceptable values are test, integration, staging, production"
}