-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvariables.tf
86 lines (79 loc) · 2.86 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
# General variables
variable "location" {
description = "Specifies the location of all resources."
type = string
sensitive = false
nullable = false
}
variable "resource_group_name" {
description = "Specifies the resource group name in which all resources will get deployed."
type = string
sensitive = false
nullable = false
validation {
condition = length(var.resource_group_name) >= 2
error_message = "Please specify a valid resource group name."
}
}
variable "tags" {
description = "Specifies a key value map of tags to set on every taggable resources."
type = map(string)
sensitive = false
nullable = false
default = {}
}
# Synapse private link hub variables
variable "synapse_private_link_hub_name" {
description = "Specifies the name of the synapse private link hub."
type = string
sensitive = false
nullable = false
}
# Diagnostics variables
variable "diagnostics_configurations" {
description = "Specifies the diagnostic configuration for the service."
type = list(object({
log_analytics_workspace_id = optional(string, ""),
storage_account_id = optional(string, "")
}))
sensitive = false
default = []
validation {
condition = alltrue([
length([for diagnostics_configuration in toset(var.diagnostics_configurations) : diagnostics_configuration if diagnostics_configuration.log_analytics_workspace_id == "" && diagnostics_configuration.storage_account_id == ""]) <= 0
])
error_message = "Please specify a valid resource ID."
}
}
# Network variables
variable "subnet_id" {
description = "Specifies the resource id of a subnet in which the private endpoints get created."
type = string
sensitive = false
validation {
condition = length(split("/", var.subnet_id)) == 11
error_message = "Please specify a valid subnet id."
}
}
variable "connectivity_delay_in_seconds" {
description = "Specifies the delay in seconds after the private endpoint deployment (required for the DNS automation via Policies)."
type = number
sensitive = false
nullable = false
default = 120
validation {
condition = var.connectivity_delay_in_seconds >= 0
error_message = "Please specify a valid non-negative number."
}
}
# DNS variables
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."
}
}