forked from oci-landing-zones/oracle-enterprise-landingzone
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvariables.tf
200 lines (179 loc) · 6.59 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
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
# -----------------------------------------------------------------------------
# Common Variables
# -----------------------------------------------------------------------------
variable "tenancy_ocid" {
type = string
description = "The OCID of tenancy"
}
variable "region" {
type = string
description = "The OCI region"
}
variable "environment_prefix" {
type = string
description = "the 1 character string representing the environment eg. P (prod), N (non-prod), D, T, U"
}
# -----------------------------------------------------------------------------
# Compartment Variables
# -----------------------------------------------------------------------------
variable "enable_compartment_delete" {
type = bool
description = "Set to true to allow the compartments to delete on terraform destroy."
default = true
}
variable "environment_compartment_id" {
type = string
description = "the OCID of the compartment where the environment will be created. In general, this should be the Landing zone parent compartment."
}
variable "security_compartment_id" {
type = string
description = "the OCID of the compartment where the environment will be created. In general, this should be the Landing zone parent compartment."
default = ""
}
variable "network_compartment_id" {
type = string
description = "the OCID of the compartment where the environment will be created. In general, this should be the Landing zone parent compartment."
default = ""
}
variable "workload_name" {
type = string
description = "The name of the workload."
default = "W"
}
variable "workload_compartment_name" {
type = string
description = "The name of the workload compartment by default OCI-ELZ-<Workload Name>-<Region>."
default = ""
}
# -----------------------------------------------------------------------------
# Monitoring Variables
# -----------------------------------------------------------------------------
variable "workload_topic_endpoints" {
type = list(string)
default = []
description = "List of email addresses for Workload notifications."
validation {
condition = length(
[for e in var.workload_topic_endpoints :
e if length(regexall("^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$", e)) > 0]
) == length(var.workload_topic_endpoints)
error_message = "Validation failed: invalid email address."
}
}
variable "network_topic_endpoints" {
type = list(string)
default = []
description = "List of email addresses for Network Warning and Critical notifications."
validation {
condition = length(
[for e in var.network_topic_endpoints :
e if length(regexall("^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$", e)) > 0]
) == length(var.network_topic_endpoints)
error_message = "Validation failed: invalid email address."
}
}
variable "secops_topic_endpoints" {
type = list(string)
default = []
description = "List of email addresses for Secops Warning and Critical notifications."
validation {
condition = length(
[for e in var.secops_topic_endpoints :
e if length(regexall("^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$", e)) > 0]
) == length(var.secops_topic_endpoints)
error_message = "Validation failed: invalid email address."
}
}
variable "is_create_alarms" {
type = bool
description = "Enable Alarms Creation in all Compartment"
default = true
}
# -----------------------------------------------------------------------------
# Workload Expansion Variables
# -----------------------------------------------------------------------------
variable "customer_onprem_ip_cidr" {
type = list(string)
default = []
}
variable "enable_vpn_on_environment" {
type = bool
default = false
}
variable "enable_vpn_or_fastconnect" {
type = string
default = "NONE"
}
variable "ipsec_connection_static_routes" {
type = list(string)
default = [""]
}
variable "enable_security_monitoring_alarms" {
type = bool
description = "Enable Security Monitoring Alarms in Security Compartment"
default = false
validation {
condition = can(regex("^([t][r][u][e]|[f][a][l][s][e])$", var.enable_security_monitoring_alarms))
error_message = "The workload_expansion_flag variable must be either true or false."
}
}
variable "enable_network_monitoring_alarms" {
type = bool
description = "Enable Network Monitoring Alarms in Network Compartment"
default = false
validation {
condition = can(regex("^([t][r][u][e]|[f][a][l][s][e])$", var.enable_network_monitoring_alarms))
error_message = "The workload_expansion_flag variable must be either true or false."
}
}
variable "enable_workload_monitoring_alarms" {
type = bool
description = "Enable Workload Monitoring Alarms in Workload Compartment"
default = false
validation {
condition = can(regex("^([t][r][u][e]|[f][a][l][s][e])$", var.enable_workload_monitoring_alarms))
error_message = "The workload_expansion_flag variable must be either true or false."
}
}
# -----------------------------------------------------------------------------
# Identity Variables
# -----------------------------------------------------------------------------
variable "security_compartment_name" {
type = string
description = "Security Compartment Name."
default = ""
}
variable "identity_domain_id" {
type = string
description = "the ocid of identity domain"
default = "ocid1.domain."
validation {
condition = can(regex("^domain$", split(".", var.identity_domain_id)[1]))
error_message = "Only Domain are OCID is allowed."
}
}
variable "identity_domain_name" {
type = string
description = "identity domain name"
default = ""
}
variable "workload_admin_group_name" {
type = string
description = "the name of workload admin group"
default = ""
}
variable "application_admin_group_name" {
type = string
description = "the name of workload application admin group"
default = ""
}
variable "database_admin_group_name" {
type = string
description = "the name of workload database admin group"
default = ""
}
variable "network_admin_group_name" {
type = string
description = "the name of landing zone Network admin group"
default = ""
}