-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvariables.tf
72 lines (63 loc) · 2.18 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
variable "region" {
description = "The IBM Cloud region where the VPC and related resources will be deployed."
type = string
}
variable "prefix" {
description = "Prefix to assign to all deployed resources. If not provided a random string will be generated."
type = string
default = ""
}
variable "use_public_gateways" {
description = "Create a public gateway in any of the three zones set to `true`."
type = object({
zone-1 = optional(bool)
zone-2 = optional(bool)
zone-3 = optional(bool)
})
default = {
zone-1 = true
zone-2 = false
zone-3 = false
}
validation {
error_message = "Keys for `use_public_gateways` must be in the order `zone-1`, `zone-2`, `zone-3`."
condition = (
(length(var.use_public_gateways) == 1 && keys(var.use_public_gateways)[0] == "zone-1") ||
(length(var.use_public_gateways) == 2 && keys(var.use_public_gateways)[0] == "zone-1" && keys(var.use_public_gateways)[1] == "zone-2") ||
(length(var.use_public_gateways) == 3 && keys(var.use_public_gateways)[0] == "zone-1" && keys(var.use_public_gateways)[1] == "zone-2") && keys(var.use_public_gateways)[2] == "zone-3"
)
}
}
variable "resource_group_id" {
description = "The ID of the resource group to use for deployed resources."
type = string
}
variable "classic_access" {
description = "Indicates if the VPC will have Classic Access."
type = bool
default = false
}
variable "address_prefix" {
description = "The address prefix to use if address_prefix_management is set to manual. This will be split in to three prefixes, one for each zone."
type = string
default = "172.16.0.0/16"
}
variable "owner_tag" {
description = "The owner tag to assign to all resources."
type = string
}
variable "use_custom_prefix" {
description = "Indicates if custom address prefixes will be used."
type = bool
default = false
}
variable "tags" {
description = "Tags to assign to all resources."
type = list(string)
default = []
}
variable "subnet_size" {
description = "Number of IPs in the created subnet aka total_ipv4_address_count"
type = string
default = "128"
}