-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathvariables.tf
158 lines (123 loc) · 4.27 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
######################################################################
# Public configurations
######################################################################
variable "enterprise_project_id" {
description = "Used to specify whether the resource is created under the enterprise project (this parameter is only valid for enterprise users)"
type = string
default = ""
}
variable "availability_zone" {
description = "The availability zone to which the VPC subnet resource belongs"
type = string
default = ""
}
######################################################################
# Configuration of VPC resource and related resources
######################################################################
variable "is_vpc_create" {
description = "Controls whether a VPC should be created (it affects all VPC related resources under this module)"
type = bool
default = true
nullable = false
}
variable "vpc_name" {
description = "The name of the VPC resource"
type = string
default = ""
}
variable "vpc_cidr" {
description = "The CIDR block of the VPC resource"
type = string
default = ""
}
variable "vpc_description" {
description = "The description of the VPC resource"
type = string
default = ""
}
variable "vpc_secondary_cidrs" {
description = "The secondary CIDR blocks of the VPC resource"
type = list(string)
default = []
nullable = false
}
variable "vpc_tags" {
description = "The key/value pairs to associte with the VPC resource"
type = map(string)
default = {}
nullable = false
}
variable "subnets_configuration" {
description = "The configuration for the subnet resources to which the VPC belongs"
type = list(object({
name = string
cidr = string
gateway_ip = optional(string, "")
description = optional(string, "")
ipv6_enabled = optional(bool, null)
dhcp_enabled = optional(bool, null)
dns_list = optional(list(string), [])
tags = optional(map(string), {})
}))
default = []
nullable = false
}
######################################################################
# Configuration of security group resource and related resources
######################################################################
variable "is_security_group_create" {
description = "Controls whether a security group should be created (it affects all security group related resources under this module)"
type = bool
default = true
nullable = false
}
variable "security_group_name" {
description = "The name of the security group resource"
type = string
default = ""
}
variable "security_group_description" {
description = "The description of the security group resource"
type = string
default = ""
}
variable "security_group_rules_configuration" {
description = "The configuration for security group rule resources to which the security group belongs"
type = list(object({
description = optional(string, "")
direction = optional(string, "ingress")
ethertype = optional(string, "IPv4")
protocol = optional(string, "")
ports = optional(string, "")
remote_ip_prefix = optional(string, "0.0.0.0/0")
remote_group_id = optional(string, "")
remote_address_group_id = optional(string, "")
address_group_name = optional(string, "")
remote_addresses = optional(list(string), [])
action = optional(string, "allow")
priority = optional(number, 0)
}))
default = []
nullable = false
}
#################################################################
# Resource name list configuration for data source queries
######################################################################
variable "query_vpc_names" {
description = "The VPC name list used to query the resource IDs"
type = list(string)
default = []
nullable = false
}
variable "query_subnet_names" {
description = "The subnet name list used to query the resource IDs"
type = list(string)
default = []
nullable = false
}
variable "query_security_group_names" {
description = "The security group name list used to query the resource IDs"
type = list(string)
default = []
nullable = false
}