Skip to content

Commit 79b1a00

Browse files
committed
fixup! Migrate cluster modules from map(map(string)) to map(object)
1 parent 26ac3c3 commit 79b1a00

5 files changed

Lines changed: 91 additions & 0 deletions

File tree

aws/_modules/eks/node_pool/variables.tf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ variable "disk_size" {
4747
type = number
4848
default = 20
4949
description = "Size in GB of node root volumes."
50+
nullable = false
5051
}
5152

5253
variable "subnet_ids" {
@@ -72,12 +73,14 @@ variable "tags" {
7273
type = map(string)
7374
description = "AWS tags to set on the node pool. Merged with Kubestack default tags."
7475
default = {}
76+
nullable = false
7577
}
7678

7779
variable "labels" {
7880
type = map(string)
7981
description = "Kubernetes labels to set on the nodes created by the node pool. Merged with Kubestack default labels."
8082
default = {}
83+
nullable = false
8184
}
8285

8386
variable "ami_type" {

aws/_modules/eks/variables.tf

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,90 +17,105 @@ variable "availability_zones" {
1717
description = "List of availability_zones for workers."
1818
type = list(string)
1919
default = []
20+
nullable = false
2021
}
2122

2223
variable "vpc_cidr" {
2324
description = "CIDR to use for the VPC."
2425
type = string
2526
default = "10.0.0.0/16"
27+
nullable = false
2628
}
2729

2830
variable "vpc_legacy_node_subnets" {
2931
description = "Whether to keep the legacy node subnets for backwards compatibility."
3032
type = bool
3133
default = false
34+
nullable = false
3235
}
3336

3437
variable "vpc_control_subnet_newbits" {
3538
description = "CIDR newbits to use for the control plane subnets."
3639
type = string
3740
default = "8"
41+
nullable = false
3842
}
3943

4044
variable "vpc_dns_hostnames" {
4145
description = "Enable DNS hostnames in the VPC."
4246
type = bool
4347
default = false
48+
nullable = false
4449
}
4550

4651
variable "vpc_dns_support" {
4752
description = "Enable DNS support in the VPC."
4853
type = bool
4954
default = true
55+
nullable = false
5056
}
5157

5258
variable "vpc_node_subnet_newbits" {
5359
description = "CIDR newbits to use for the node pool subnets."
5460
type = string
5561
default = "4"
62+
nullable = false
5663
}
5764

5865
variable "vpc_node_subnet_number_offset" {
5966
description = "CIDR subnet number offset to use for the node pool subnets."
6067
type = string
6168
default = "1"
69+
nullable = false
6270
}
6371

6472
variable "vpc_subnet_map_public_ip" {
6573
description = "Whether nodes should have public IPs."
6674
type = bool
6775
default = true
76+
nullable = false
6877
}
6978

7079
variable "instance_types" {
7180
description = "Set of AWS instance types to use for nodes."
7281
type = set(string)
7382
default = []
83+
nullable = false
7484
}
7585

7686
variable "desired_capacity" {
7787
description = "Desired number of worker nodes."
7888
type = number
7989
default = 1
90+
nullable = false
8091
}
8192

8293
variable "max_size" {
8394
description = "Maximum number of worker nodes."
8495
type = number
8596
default = 1
97+
nullable = false
8698
}
8799

88100
variable "min_size" {
89101
description = "Minimum number of worker nodes."
90102
type = number
91103
default = 1
104+
nullable = false
92105
}
93106

94107
variable "root_device_encrypted" {
95108
type = bool
96109
default = true
97110
description = "Whether to encrypt root device volumes of worker nodes."
111+
nullable = false
98112
}
99113

100114
variable "root_device_volume_size" {
101115
type = number
102116
default = 20
103117
description = "Size in GB for root device volumes of worker nodes."
118+
nullable = false
104119
}
105120

106121
variable "taints" {
@@ -116,42 +131,49 @@ variable "additional_node_tags" {
116131
type = map(string)
117132
default = {}
118133
description = "Additional AWS tags to set on the node pool."
134+
nullable = false
119135
}
120136

121137
variable "aws_auth_map_roles" {
122138
description = "mapRoles entries added to aws-auth configmap"
123139
type = string
124140
default = ""
141+
nullable = false
125142
}
126143

127144
variable "aws_auth_map_users" {
128145
description = "mapUsers entries added to aws-auth configmap"
129146
type = string
130147
default = ""
148+
nullable = false
131149
}
132150

133151
variable "aws_auth_map_accounts" {
134152
description = "mapAccounts entries added to aws-auth configmap"
135153
type = string
136154
default = ""
155+
nullable = false
137156
}
138157

139158
variable "disable_default_ingress" {
140159
type = bool
141160
description = "Whether to disable the default ingress."
142161
default = false
162+
nullable = false
143163
}
144164

145165
variable "enabled_cluster_log_types" {
146166
type = list(string)
147167
description = "List of cluster log types to enable."
148168
default = ["api", "audit", "authenticator", "controllerManager", "scheduler"]
169+
nullable = false
149170
}
150171

151172
variable "disable_openid_connect_provider" {
152173
type = bool
153174
description = "Whether to disable the OpenID connect provider."
154175
default = false
176+
nullable = false
155177
}
156178

157179
variable "cluster_version" {
@@ -163,12 +185,14 @@ variable "cluster_endpoint_private_access" {
163185
type = bool
164186
default = false
165187
description = "Whether the Amazon EKS private API server endpoint is enabled (making the kubernetes API endpoint accessible from the internal network)."
188+
nullable = false
166189
}
167190

168191
variable "cluster_endpoint_public_access" {
169192
type = bool
170193
default = true
171194
description = "Whether the Amazon EKS public API server endpoint is enabled (making the kubernetes API endpoint accessible from the public internet)."
195+
nullable = false
172196
}
173197

174198
variable "cluster_public_access_cidrs" {

azurerm/_modules/aks/variables.tf

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,60 +27,70 @@ variable "legacy_vnet_name" {
2727
type = bool
2828
description = "Wheter to use the legacy vnet and subnet names."
2929
default = false
30+
nullable = false
3031
}
3132

3233
variable "vnet_address_space" {
3334
type = list(string)
3435
description = "Address space for the virtual network."
3536
default = ["10.0.0.0/8"]
37+
nullable = false
3638
}
3739

3840
variable "subnet_address_prefixes" {
3941
type = list(string)
4042
description = "Address space for the cluster subnet."
4143
default = ["10.1.0.0/16"]
44+
nullable = false
4245
}
4346

4447
variable "subnet_service_endpoints" {
4548
type = list(string)
4649
description = "List of service endpoints to expose on the subnet."
4750
default = []
51+
nullable = false
4852
}
4953

5054
variable "network_plugin" {
5155
type = string
5256
description = "Network plugin to use. Set to 'azure' for CNI; 'kubenet' for Basic"
5357
default = "kubenet"
58+
nullable = false
5459
}
5560

5661
variable "network_policy" {
5762
type = string
5863
description = "Network policy to use. Set to 'azure' for CNI; 'calico' for Basic"
5964
default = "calico"
65+
nullable = false
6066
}
6167

6268
variable "dns_prefix" {
6369
type = string
6470
description = "DNS prefix of AKS cluster API server."
6571
default = "api"
72+
nullable = false
6673
}
6774

6875
variable "service_cidr" {
6976
type = string
7077
description = "CIDR range for kubernetes service."
7178
default = "10.0.0.0/16"
79+
nullable = false
7280
}
7381

7482
variable "dns_service_ip" {
7583
type = string
7684
description = "IP address for the kube-dns service. Must be within service_cidr."
7785
default = "10.0.0.10"
86+
nullable = false
7887
}
7988

8089
variable "pod_cidr" {
8190
type = string
8291
description = "CIDR range for pods."
8392
default = "10.244.0.0/16"
93+
nullable = false
8494
}
8595

8696
variable "max_pods" {
@@ -102,30 +112,35 @@ variable "default_node_pool" {
102112
})
103113
description = "Default node pool configuration."
104114
default = {}
115+
nullable = false
105116
}
106117

107118
variable "disable_default_ingress" {
108119
type = bool
109120
description = "Whether to disable the default ingress."
110121
default = false
122+
nullable = false
111123
}
112124

113125
variable "default_ingress_ip_zones" {
114126
type = list(string)
115127
description = "Explicit list of zones for the ingress public IP."
116128
default = []
129+
nullable = false
117130
}
118131

119132
variable "enable_azure_policy_agent" {
120133
type = bool
121134
description = "whether to deploy the Azure policy agent to the cluster"
122135
default = false
136+
nullable = false
123137
}
124138

125139
variable "disable_managed_identities" {
126140
type = bool
127141
description = "Keep using legacy service principal instead of new managed identities."
128142
default = false
143+
nullable = false
129144
}
130145

131146
variable "user_assigned_identity_id" {
@@ -137,6 +152,7 @@ variable "sku_tier" {
137152
type = string
138153
description = "The SKU tier to use for the cluster. Possible values are 'Free' and 'Paid'. Defaults to 'Free'."
139154
default = "Free"
155+
nullable = false
140156
}
141157

142158
variable "kubernetes_version" {
@@ -153,25 +169,29 @@ variable "enable_log_analytics" {
153169
type = bool
154170
description = "whether to deploy the Azure Log analytics with the cluster"
155171
default = true
172+
nullable = false
156173
}
157174

158175
variable "availability_zones" {
159176
type = list(string)
160177
description = "The list of availability zones to create the node pool in"
161178
default = []
179+
nullable = false
162180
}
163181

164182

165183
variable "keda_enabled" {
166184
type = bool
167185
description = "Whether KEDA Autoscaler should be enabled for the cluster."
168186
default = false
187+
nullable = false
169188
}
170189

171190
variable "vertical_pod_autoscaler_enabled" {
172191
type = bool
173192
description = "Whether Vertical Pod Autoscaler should be enabled for the cluster."
174193
default = false
194+
nullable = false
175195
}
176196

177197
variable "upgrade_settings" {
@@ -182,4 +202,5 @@ variable "upgrade_settings" {
182202
})
183203
description = "Upgrade settings for the default node pool."
184204
default = {}
205+
nullable = false
185206
}

0 commit comments

Comments
 (0)