-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvariables.tf
executable file
·66 lines (56 loc) · 1.72 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
variable "friendly_name_prefix" {
type = string
description = "Prefix used to name Azure resources uniquely."
validation {
condition = !strcontains(var.friendly_name_prefix, "vnet")
error_message = "The prefix should not contain 'vnet'."
}
validation { # needs 0.13+
condition = (
length(var.friendly_name_prefix) <= 12
)
error_message = "Variable is too long, 12 chars max."
}
}
variable "resource_group_name" {
type = string
description = "Name of the resource group where the resources will be created"
default = null
}
variable "random_string" {
type = string
description = "Random string to append to certain resource names."
default = null
}
variable "location" {
type = string
description = "The Azure region to deploy all infrastructure to."
validation {
condition = can(regex("^[A-Z][a-z]+ [A-Z][a-z]+$", var.location))
error_message = "Region must be in the format 'Region Name' with each word capitalized."
}
}
variable "common_tags" {
type = map(string)
description = "(Optional) Map of common tags for taggable resources."
default = {}
}
variable "vnet_address_space" {
type = list(string)
description = "(Optional) list of vnet address ranges"
default = ["10.0.0.0/16"]
}
variable "public_subnet_address_spaces" {
description = "A list of publically accessible subnet address spaces and names."
type = list(object({
name = string
address_space = string
}))
}
variable "private_subnet_address_spaces" {
description = "A list of privately accessible subnet address spaces and names."
type = list(object({
name = string
address_space = string
}))
}