-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathvariables.tf
More file actions
85 lines (74 loc) · 2.57 KB
/
variables.tf
File metadata and controls
85 lines (74 loc) · 2.57 KB
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
variable "ibmcloud_api_key" {
description = "APIkey that's associated with the account to provision resources to"
type = string
sensitive = true
}
variable "region" {
description = "The region to which to deploy the VPC"
type = string
}
variable "prefix" {
description = "The prefix that you would like to append to your resources"
type = string
}
variable "resource_group" {
type = string
description = "An existing resource group name to use for this example, if unset a new resource group will be created"
default = null
}
variable "resource_tags" {
description = "List of Tags for the resource created"
type = list(string)
default = null
}
variable "access_tags" {
type = list(string)
description = "Optional list of access tags to add to the VPC resources that are created"
default = []
}
variable "enable_vpc_flow_logs" {
type = bool
description = "Enable VPC Flow Logs, it will create Flow logs collector if set to true"
default = true
}
variable "cos_plan" {
description = "Plan to be used for creating cloud object storage instance"
type = string
default = "standard"
validation {
condition = contains(["standard"], var.cos_plan)
error_message = "The specified cos_plan is not a valid selection!"
}
}
variable "cos_location" {
description = "Location of the cloud object storage instance"
type = string
default = "global"
}
variable "create_authorization_policy_vpc_to_cos" {
description = "Set it to true if authorization policy is required for VPC to access COS"
type = bool
default = true
}
variable "address_prefixes" {
description = "OPTIONAL - IP range that will be defined for the VPC for a certain location. Use only with manual address prefixes"
type = object({
zone-1 = optional(list(string))
zone-2 = optional(list(string))
zone-3 = optional(list(string))
})
default = {
zone-1 = ["10.10.10.0/24"]
zone-2 = ["10.20.10.0/24"]
zone-3 = ["10.30.10.0/24"]
}
validation {
error_message = "Keys for `use_public_gateways` must be in the order `zone-1`, `zone-2`, `zone-3`."
condition = var.address_prefixes == null ? true : (keys(var.address_prefixes)[0] == "zone-1" && keys(var.address_prefixes)[1] == "zone-2" && keys(var.address_prefixes)[2] == "zone-3")
}
}
variable "network_cidrs" {
description = "List of Network CIDRs for the VPC. This is used to manage network ACL rules for cluster provisioning."
type = list(string)
default = ["10.0.0.0/8", "164.0.0.0/8"]
}