generated from oracle/template-repo
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathvariables_iam.tf
361 lines (341 loc) · 14.1 KB
/
variables_iam.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
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
# Copyright (c) 2023 Oracle and/or its affiliates.
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
# ------------------------------------------------------
# ----- IAM - Base Compartments
#-------------------------------------------------------
variable "enclosing_compartment_options" {
type = string
default = "Yes, deploy new"
description = "Determines where the landing zone compartments are deployed: within a new enclosing compartment or within an existing select enclosing compartment (that can be the Root compartment). Valid options: 'Yes, deploy new', 'Yes, use existing', 'No'"
}
variable "enclosing_compartment_parent_ocid" {
type = string
default = null
description = "The existing compartment where Landing Zone enclosing compartment is created."
}
variable "existing_enclosing_compartment_ocid" {
type = string
default = null
description = "The existing compartment where Landing Zone compartments (Network, Security, App, Database) are created."
}
variable "deploy_exainfra_cmp" {
type = bool
default = false
description = "Whether a separate compartment for Exadata Cloud Service Infrastructure is deployed."
}
# ------------------------------------------------------
# ----- IAM - Identity Domains
#-------------------------------------------------------
//variable "use_custom_id_domain" {
// type = bool
// default = false
// description = "Whether to use an existing identity domain with groups and dynamic groups to grant landing zone IAM policies. If false, groups and dynamic groups from the Default identity domain are utilized."
//}
# variable "custom_id_domain_name" {
# type = string
# default = null
# description = "The existing identity domain name."
# }
variable "custom_id_domain_ocid" {
type = string
default = null
description = "The existing identity domain OCID."
}
variable "deploy_custom_domain_groups" {
type = bool
default = false
description = "Whether to deploy IAM domain groups and dynamic groups in the existing domain. If false, the Landing Zone will use the existing groups and dynamic groups in the existing domain."
}
variable "rm_existing_id_domain_iam_admin_group_name" {
type = list(string)
default = []
description = "The existing IAM admin group name in the existing identity domain."
}
variable "rm_existing_id_domain_cred_admin_group_name" {
type = list(string)
default = []
description = "The existing credentials admin group name in the existing identity domain."
}
variable "rm_existing_id_domain_security_admin_group_name" {
type = list(string)
default = []
description = "The existing security admin group name in the existing identity domain."
}
variable "rm_existing_id_domain_network_admin_group_name" {
type = list(string)
default = []
description = "The existing network admin group name in the existing identity domain."
}
variable "rm_existing_id_domain_appdev_admin_group_name" {
type = list(string)
default = []
description = "The existing applications admin group name in the existing identity domain."
}
variable "rm_existing_id_domain_database_admin_group_name" {
type = list(string)
default = []
description = "The existing database admin group name in the existing identity domain."
}
variable "rm_existing_id_domain_auditor_group_name" {
type = list(string)
default = []
description = "The existing auditor group name in the existing identity domain."
}
variable "rm_existing_id_domain_announcement_reader_group_name" {
type = list(string)
default = []
description = "The existing announcement readers group name in the existing identity domain."
}
variable "rm_existing_id_domain_exainfra_admin_group_name" {
type = list(string)
default = []
description = "The existing Exadata CS infrastructure admin group name in the existing identity domain."
}
variable "rm_existing_id_domain_cost_admin_group_name" {
type = list(string)
default = []
description = "The existing cost admin group name in the existing identity domain."
}
variable "rm_existing_id_domain_storage_admin_group_name" {
type = list(string)
default = []
description = "The existing storage admin group name in the existing identity domain."
}
variable "rm_existing_id_domain_ag_admin_group_name" {
type = list(string)
default = []
description = "The existing access governance admin group name in the existing identity domain."
}
variable "existing_id_domain_security_fun_dyn_group_name" {
type = string
default = ""
description = "The existing dynamic group name in the existing identity domain for executing security functions."
}
variable "existing_id_domain_appdev_fun_dyn_group_name" {
type = string
default = ""
description = "The existing dynamic group name in the existing identity domain for executing applications functions."
}
variable "existing_id_domain_compute_agent_dyn_group_name" {
type = string
default = ""
description = "The existing dynamic group name in the existing identity domain for Compute agents."
}
variable "existing_id_domain_database_kms_dyn_group_name" {
type = string
default = ""
description = "The existing dynamic group name in the existing identity domain for accessing database encryption keys."
}
variable "existing_id_domain_net_fw_app_dyn_group_name" {
type = string
default = ""
description = "The existing dynamic group name in the existing identity domain for running network firewall appliances."
}
variable "identity_domain_option" {
type = string
default = "Default Domain"
description = "Option to use the default identity domain, create a new identity domain or use custom identity domain. Value to use: Default Domain, New Identity Domain, Use Custom Identity Domain"
}
variable "new_identity_domain_name" {
type = string
default = ""
description = "The name of the new identity domain if the option to create a new identity domain is chosen."
}
variable "new_identity_domain_license_type" {
type = string
default = "free"
description = "the license type of new identity domain. Value to use: free, premium"
}
# variable "deploy_id_domain" {
# type = bool
# default = false
# }
# variable "id_domain_name" {
# type = string
# default = null
# }
# variable "id_domain_type" {
# type = string
# default = "free"
# }
# variable "use_id_domain_groups_to_manage_tenancy" {
# type = bool
# default = false
# }
# ------------------------------------------------------
# ----- IAM - Groups
#-------------------------------------------------------
variable "groups_options" {
type = string
default = "Yes"
description = "Whether to deploy new groups or use existing groups."
}
variable "rm_existing_iam_admin_group_name" {
type = string
default = ""
description = "Only applicable to RMS deployments. The existing group to which IAM management policies will be granted to."
}
variable "existing_iam_admin_group_name" {
type = list(string)
default = []
description = "The existing group to which IAM management policies will be granted to."
}
variable "rm_existing_cred_admin_group_name" {
type = string
default = ""
description = "Only applicable to RMS deployments. The existing group to which credentials management policies will be granted to."
}
variable "existing_cred_admin_group_name" {
type = list(string)
default = []
description = "The existing group to which credentials management policies will be granted to."
}
variable "rm_existing_security_admin_group_name" {
type = string
default = ""
description = "Only applicable to RMS deployments. The existing group to which security policies will be granted to."
}
variable "existing_security_admin_group_name" {
type = list(string)
default = []
description = "The existing group to which security management policies will be granted to."
}
variable "rm_existing_network_admin_group_name" {
type = string
default = ""
description = "Only applicable to RMS deployments. The existing group to which network management policies will be granted to."
}
variable "existing_network_admin_group_name" {
type = list(string)
default = []
description = "The existing group to which network management policies will be granted to."
}
variable "rm_existing_appdev_admin_group_name" {
type = string
default = ""
description = "Only applicable to RMS deployments. The existing group to which application management policies will be granted to."
}
variable "existing_appdev_admin_group_name" {
type = list(string)
default = []
description = "The existing group to which application management policies will be granted to."
}
variable "rm_existing_database_admin_group_name" {
type = string
default = ""
description = "Only applicable to RMS deployments. The existing group to which database management policies will be granted to."
}
variable "existing_database_admin_group_name" {
type = list(string)
default = []
description = "The existing group to which database management policies will be granted to."
}
variable "rm_existing_auditor_group_name" {
type = string
default = ""
description = "Only applicable to RMS deployments. The existing group to which auditor policies will be granted to."
}
variable "existing_auditor_group_name" {
type = list(string)
default = []
description = "The existing group to which auditing policies will be granted to."
}
variable "rm_existing_announcement_reader_group_name" {
type = string
default = ""
description = "Only applicable to RMS deployments. The existing group to which announcement reader policies will be granted to."
}
variable "existing_announcement_reader_group_name" {
type = list(string)
default = []
description = "The existing group to which announcement reading policies will be granted to."
}
variable "rm_existing_exainfra_admin_group_name" {
type = string
default = ""
description = "Only applicable to RMS deployments. The existing group to which Exadata Cloud Service infrastructure management policies will be granted to."
}
variable "existing_exainfra_admin_group_name" {
type = list(string)
default = []
description = "The existing group to which Exadata Cloud Service infrastructure management policies will be granted to."
}
variable "rm_existing_cost_admin_group_name" {
type = string
default = ""
description = "Only applicable to RMS deployments. The existing group to which cost management policies will be granted to."
}
variable "existing_cost_admin_group_name" {
type = list(string)
default = []
description = "The existing group to which Cost management policies will be granted to."
}
variable "rm_existing_storage_admin_group_name" {
type = string
default = ""
description = "Only applicable to RMS deployments. The existing group to which storage management policies will be granted to."
}
variable "existing_storage_admin_group_name" {
type = list(string)
default = []
description = "The existing group to which Storage management policies will be granted to."
}
variable "rm_existing_ag_admin_group_name" {
type = string
default = ""
description = "Only applicable to RMS deployments. The existing group to which access governance policies will be granted to."
}
variable "existing_ag_admin_group_name" {
type = list(string)
default = []
description = "The existing group to which Access Governance management policies will be granted to."
}
# ------------------------------------------------------
# ----- IAM - Dynamic Groups
#-------------------------------------------------------
variable "dyn_groups_options" {
type = string
default = "Yes"
}
variable "existing_security_fun_dyn_group_name" {
type = string
default = ""
description = "Existing security dynamic group to run functions."
}
variable "existing_appdev_fun_dyn_group_name" {
type = string
default = ""
description = "Existing appdev dynamic group."
}
variable "existing_compute_agent_dyn_group_name" {
type = string
default = ""
description = "Existing compute agent dynamic group for management agent access."
}
variable "existing_database_kms_dyn_group_name" {
type = string
default = ""
description = "Existing database dynamic group for database to access keys."
}
variable "existing_net_fw_app_dyn_group_name" {
type = string
default = ""
description = "Existing network firewall appliance dynamic group for reading firewall instances."
}
# ------------------------------------------------------
# ----- IAM - Policies
#-------------------------------------------------------
variable "policies_in_root_compartment" {
type = string
default = "CREATE"
description = "Whether policies in the Root compartment should be created or simply used. If 'CREATE', you must be sure the user executing this stack has permissions to create policies in the Root compartment. If 'USE', policies must have been created previously."
validation {
condition = contains(["CREATE", "USE"], var.policies_in_root_compartment)
error_message = "Validation failed for policies_in_root_compartment: valid values are CREATE or USE."
}
}
# variable "enable_template_policies" {
# type = bool
# default = false
# description = "Whether policies should be created based on metadata associated to compartments. This is an alternative way of managing policies, enabled by the CIS Landing Zone standalone IAM policy module: https://github.com/oracle-quickstart/terraform-oci-cis-landing-zone-iam/tree/main/policies. When set to true, the grants to resources belonging to a specific compartment are combined into a single policy that is attached to the compartment itself. This differs from the default approach, where grants are combined per grantee and attached to the enclosing compartment."
# }