-
Notifications
You must be signed in to change notification settings - Fork 0
/
variables.tf
209 lines (175 loc) · 7.35 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
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
################################################################################
# Global
################################################################################
variable "resource_group_name" {
description = "Name of the resource group"
type = string
}
variable "location" {
description = "Location of the storage account and container registry. This should be kept similar to resource group for ideal performance."
type = string
}
################################################################################
# Cluster
################################################################################
variable "cluster_name" {
description = "Name of the AKS cluster"
type = string
}
variable "cluster_id" {
description = "ID of the AKS cluster"
type = string
}
################################################################################
# Storage account
################################################################################
variable "feature_blob_storage_enabled" {
description = "Enable blob storage feature in the platform"
type = bool
default = true
}
variable "blob_storage_account_enable_override" {
description = "Enable overriding the name of storage account. This will only be used if feature_blob_storage_enabled is true. You need to pass blob_storage_account_override_name to pass the storage account name"
type = bool
default = false
}
variable "blob_storage_account_override_name" {
description = "Storage account name. Only used if blob_storage_account_enable_override is true"
type = string
default = ""
validation {
condition = var.blob_storage_account_override_name == "" || can(regex("^[a-z0-9]{3,24}$", var.blob_storage_account_override_name))
error_message = "Storage account must be alphanumeric with length between 3 and 24 characters"
}
}
variable "blob_container_enable_override" {
description = "Enable overriding the name of container. This will only be used if feature_blob_storage_enabled is true. You need to pass container_override_name to pass the container name"
type = bool
default = false
}
variable "blob_container_override_name" {
description = "Container name. Only used if container_enable_override is true"
type = string
default = ""
validation {
condition = var.blob_container_override_name == "" || can(regex("^[a-z0-9-]{2,62}[a-z0-9]$", var.blob_container_override_name))
error_message = "Container name must be alphanumeric with length between 3 and 63 characters"
}
}
variable "blob_storage_account_account_tier" {
description = "Account tier of the storage account"
type = string
default = "Standard"
}
variable "blob_storage_account_replication_type" {
description = "Replication type of storage account"
type = string
default = "GRS"
}
variable "blob_storage_cors_allowed_origins" {
description = "List of allowed origin for CORS of storage account"
type = list(string)
default = ["*"]
}
variable "blob_storage_cors_allowed_methods" {
description = "List of allowed methods for CORS of storage account"
type = list(string)
default = ["GET", "POST", "PUT"]
}
variable "blob_storage_cors_allowed_maxage" {
description = "List of allowed maxage for CORS of storage account"
type = number
default = 3000
}
variable "blob_storage_cors_allowed_headers" {
description = "List of allowed headers for CORS of storage account"
type = list(string)
default = ["*"]
}
variable "blob_storage_account_exposed_headers" {
description = "List of exposed headers for CORS origins of storage account"
type = list(string)
default = ["Etag"]
}
################################################################################
# Docker registry
################################################################################
variable "feature_container_registry_enabled" {
description = "Enable docker registry feature in the platform"
type = bool
default = true
}
variable "container_registry_enable_override" {
description = "Enable overriding the name of container registry. This will only be used if feature_container_registry_enabled is true. You need to pass container_registry_override_name to pass the container registry name"
type = bool
default = false
}
variable "container_registry_override_name" {
description = "Container registry name. Only used if container_registry_enable_override is true"
type = string
default = ""
validation {
condition = var.container_registry_override_name == "" || can(regex("^[a-zA-Z0-9]{5,50}$", var.container_registry_override_name))
error_message = "Container registry must be alphanumeric with length between 5 and 50 characters"
}
}
variable "container_registry_sku" {
description = "SKU of the docker registry"
type = string
default = "Standard"
}
variable "container_registry_admin_enabled" {
description = "Enable admin for the docker registry"
type = bool
default = true
}
variable "container_registry_public_network_access_enabled" {
description = "Whether public network access is allowed for the container registry"
type = bool
default = true
}
##################################################################################
## Cluster Integration
##################################################################################
variable "feature_cluster_integration_enabled" {
description = "Enable the support of cluster integration"
default = true
type = bool
}
variable "cluster_integration_azuread_application_enable_override" {
description = "Enable overriding the name of azuread application. This will only be used if feature_cluster_integration_azuread_application_enabled is true. You need to pass cluster_integration_azuread_application_override_name to pass the azuread application name"
type = bool
default = false
}
variable "cluster_integration_azuread_application_override_name" {
description = "Azuread application name. Only used if cluster_integration_azuread_application_enable_override is true"
type = string
default = ""
validation {
condition = var.cluster_integration_azuread_application_override_name == "" || can(regex("^[a-z0-9-]{0,119}[a-z0-9]$", var.cluster_integration_azuread_application_override_name))
error_message = "Container name must be alphanumeric with length between 120 characters"
}
}
variable "cluster_integration_sign_in_audience" {
description = "sign_in_audience of the cluster integration"
type = string
default = "AzureADMyOrg"
}
variable "cluster_integration_service_principal_password_expiry_end_date" {
description = "End date post which service principal password would expire"
type = string
default = "2124-02-12T09:42:53Z"
}
variable "cluster_integration_service_principal_role" {
description = "Role that will be assigned to the service principal on AKS cluster"
type = string
default = "Reader"
}
##################################################################################
## Other variables
##################################################################################
variable "tags" {
description = "A map of tags to add to all resources"
type = map(string)
default = {}
}