-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
variables.tf
220 lines (199 loc) · 9.34 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
210
211
212
213
214
215
216
217
218
219
220
variable "company_name" {
description = "Specifies the name of the company."
type = string
sensitive = false
}
variable "location" {
description = "Specifies the location for all Azure resources."
type = string
sensitive = false
}
variable "location_purview" {
description = "Specifies the location for Microsoft Purview. The location of Purview is bound to the Microsoft Entra ID location."
type = string
sensitive = false
}
variable "environment" {
description = "Specifies the environment of the deployment."
type = string
sensitive = false
default = "dev"
validation {
condition = contains(["dev", "tst", "qa", "prd"], var.environment)
error_message = "Please use an allowed value: \"dev\", \"tst\", \"qa\" or \"prd\"."
}
}
variable "prefix" {
description = "Specifies the prefix for all resources created in this deployment."
type = string
sensitive = false
validation {
condition = length(var.prefix) >= 2 && length(var.prefix) <= 10
error_message = "Please specify a prefix with more than two and less than 10 characters."
}
}
variable "tags" {
description = "Specifies the tags that you want to apply to all resources."
type = map(string)
sensitive = false
default = {}
}
variable "vnet_id" {
description = "Specifies the resource ID of the Vnet used for the Data Management Zone"
type = string
sensitive = false
validation {
condition = length(split("/", var.vnet_id)) == 9
error_message = "Please specify a valid resource ID."
}
}
variable "nsg_id" {
description = "Specifies the resource ID of the default network security group for the Data Management Zone"
type = string
sensitive = false
validation {
condition = length(split("/", var.nsg_id)) == 9
error_message = "Please specify a valid resource ID."
}
}
variable "route_table_id" {
description = "Specifies the resource ID of the default route table for the Data Management Zone"
type = string
sensitive = false
validation {
condition = length(split("/", var.route_table_id)) == 9
error_message = "Please specify a valid resource ID."
}
}
variable "subnet_cidr_ranges" {
description = "Specifies the cidr ranges of the subnets used for the Data Management Zone. If not specified, the module will automatically define the right subnet cidr ranges. For this to work, the provided vnet must have no subnets."
type = object(
{
private_endpoint_subnet = optional(string, "")
databricks_private_subnet = optional(string, "")
databricks_public_subnet = optional(string, "")
}
)
sensitive = false
default = {}
validation {
condition = alltrue([
var.subnet_cidr_ranges.private_endpoint_subnet == "" || try(cidrnetmask(var.subnet_cidr_ranges.private_endpoint_subnet), "invalid") != "invalid",
var.subnet_cidr_ranges.databricks_private_subnet == "" || try(cidrnetmask(var.subnet_cidr_ranges.databricks_private_subnet), "invalid") != "invalid",
var.subnet_cidr_ranges.databricks_public_subnet == "" || try(cidrnetmask(var.subnet_cidr_ranges.databricks_public_subnet), "invalid") != "invalid",
])
error_message = "Please specify a valid CIDR range for all subnets."
}
}
variable "private_dns_zone_id_namespace" {
description = "Specifies the resource ID of the private DNS zone for the EventHub namespace. Not required if DNS A-records get created via Azure Policy."
type = string
sensitive = false
default = ""
validation {
condition = var.private_dns_zone_id_namespace == "" || (length(split("/", var.private_dns_zone_id_namespace)) == 9 && endswith(var.private_dns_zone_id_namespace, "privatelink.servicebus.windows.net"))
error_message = "Please specify a valid resource ID for the private DNS Zone."
}
}
variable "private_dns_zone_id_purview_account" {
description = "Specifies the resource ID of the private DNS zone for the Purview account. Not required if DNS A-records get created via Azure Policy."
type = string
sensitive = false
default = ""
validation {
condition = var.private_dns_zone_id_purview_account == "" || (length(split("/", var.private_dns_zone_id_purview_account)) == 9 && endswith(var.private_dns_zone_id_purview_account, "privatelink.purview.azure.com"))
error_message = "Please specify a valid resource ID for the private DNS Zone."
}
}
variable "private_dns_zone_id_purview_portal" {
description = "Specifies the resource ID of the private DNS zone for the Purview portal. Not required if DNS A-records get created via Azure Policy."
type = string
sensitive = false
default = ""
validation {
condition = var.private_dns_zone_id_purview_portal == "" || (length(split("/", var.private_dns_zone_id_purview_portal)) == 9 && endswith(var.private_dns_zone_id_purview_portal, "privatelink.purviewstudio.azure.com"))
error_message = "Please specify a valid resource ID for the private DNS Zone."
}
}
variable "private_dns_zone_id_blob" {
description = "Specifies the resource ID of the private DNS zone for Azure Storage blob endpoints. Not required if DNS A-records get created via Azure Policy."
type = string
sensitive = false
default = ""
validation {
condition = var.private_dns_zone_id_blob == "" || (length(split("/", var.private_dns_zone_id_blob)) == 9 && endswith(var.private_dns_zone_id_blob, "privatelink.blob.core.windows.net"))
error_message = "Please specify a valid resource ID for the private DNS Zone."
}
}
variable "private_dns_zone_id_dfs" {
description = "Specifies the resource ID of the private DNS zone for Azure Storage dfs endpoints. Not required if DNS A-records get created via Azure Policy."
type = string
sensitive = false
default = ""
validation {
condition = var.private_dns_zone_id_dfs == "" || (length(split("/", var.private_dns_zone_id_dfs)) == 9 && endswith(var.private_dns_zone_id_dfs, "privatelink.dfs.core.windows.net"))
error_message = "Please specify a valid resource ID for the private DNS Zone."
}
}
variable "private_dns_zone_id_queue" {
description = "Specifies the resource ID of the private DNS zone for Azure Storage queue endpoints. Not required if DNS A-records get created via Azure Policy."
type = string
sensitive = false
default = ""
validation {
condition = var.private_dns_zone_id_queue == "" || (length(split("/", var.private_dns_zone_id_queue)) == 9 && endswith(var.private_dns_zone_id_queue, "privatelink.queue.core.windows.net"))
error_message = "Please specify a valid resource ID for the private DNS Zone."
}
}
variable "private_dns_zone_id_container_registry" {
description = "Specifies the resource ID of the private DNS zone for Azure Container Registry. Not required if DNS A-records get created via Azure Policy."
type = string
sensitive = false
default = ""
validation {
condition = var.private_dns_zone_id_container_registry == "" || (length(split("/", var.private_dns_zone_id_container_registry)) == 9 && endswith(var.private_dns_zone_id_container_registry, "privatelink.azurecr.io"))
error_message = "Please specify a valid resource ID for the private DNS Zone."
}
}
variable "private_dns_zone_id_synapse_portal" {
description = "Specifies the resource ID of the private DNS zone for Synapse PL Hub. Not required if DNS A-records get created via Azure Policy."
type = string
sensitive = false
default = ""
validation {
condition = var.private_dns_zone_id_synapse_portal == "" || (length(split("/", var.private_dns_zone_id_synapse_portal)) == 9 && endswith(var.private_dns_zone_id_synapse_portal, "privatelink.azuresynapse.net"))
error_message = "Please specify a valid resource ID for the private DNS Zone."
}
}
variable "private_dns_zone_id_key_vault" {
description = "Specifies the resource ID of the private DNS zone for Azure Key Vault. Not required if DNS A-records get created via Azure Policy."
type = string
sensitive = false
default = ""
validation {
condition = var.private_dns_zone_id_key_vault == "" || (length(split("/", var.private_dns_zone_id_key_vault)) == 9 && endswith(var.private_dns_zone_id_key_vault, "privatelink.vaultcore.azure.net"))
error_message = "Please specify a valid resource ID for the private DNS Zone."
}
}
variable "private_dns_zone_id_databricks" {
description = "Specifies the resource ID of the private DNS zone for Azure Databricks UI endpoints. Not required if DNS A-records get created via Azure Policy."
type = string
sensitive = false
default = ""
validation {
condition = var.private_dns_zone_id_databricks == "" || (length(split("/", var.private_dns_zone_id_databricks)) == 9 && endswith(var.private_dns_zone_id_databricks, "privatelink.azuredatabricks.net"))
error_message = "Please specify a valid resource ID for the private DNS Zone."
}
}
variable "purview_root_collection_admins" {
description = "Specifies the list of user object IDs that are assigned as collection admin to the root collection in Purview."
type = list(string)
sensitive = false
default = []
}
variable "data_platform_subscription_ids" {
description = "Specifies the list of subscription IDs of your data platform."
type = list(string)
sensitive = false
default = []
}