generated from oracle-quickstart/oci-quickstart-template
-
Notifications
You must be signed in to change notification settings - Fork 3
/
iam.tf
52 lines (44 loc) · 2.35 KB
/
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
# ---------------------------------------------------------------------------------------------------------------------
# Create IAM groups
# ---------------------------------------------------------------------------------------------------------------------
module "groups" {
source = "./iam/groups"
count = var.deploy_global_resources ? 1 : 0
tenancy_ocid = var.tenancy_ocid
workload_compartment_name = var.workload_compartment_name
workload_admins_group_name = var.workload_admins_group_name
workload_users_group_name = var.workload_users_group_name
workload_storage_admins_group_name = var.workload_storage_admins_group_name
workload_storage_users_group_name = var.workload_storage_users_group_name
database_admins_group_name = var.database_admins_group_name
tag_cost_center = var.tag_cost_center
tag_geo_location = var.tag_geo_location
suffix = var.is_sandbox_mode_enabled == true ? "-${random_id.suffix.hex}" : ""
providers = {
oci = oci.home_region
}
}
# ---------------------------------------------------------------------------------------------------------------------
# Create IAM policies
# ---------------------------------------------------------------------------------------------------------------------
module "policies" {
source = "./iam/policies"
count = var.deploy_global_resources ? 1 : 0
tenancy_ocid = var.tenancy_ocid
region = var.region
workload_compartment_name = var.workload_compartment_name
workload_compartment_id = module.workload-compartment.workload_compartment_id
network_compartment_id = var.network_compartment_id
network_compartment_name = var.network_compartment_name
workload_storage_admins_group_name = module.groups[0].workload_storage_admins_group_name
workload_storage_users_group_name = module.groups[0].workload_storage_users_group_name
workload_admins_group_name = module.groups[0].workload_admins_group_name
workload_users_group_name = module.groups[0].workload_users_group_name
database_admins_group_name = module.groups[0].database_admins_group_name
tag_cost_center = var.tag_cost_center
tag_geo_location = var.tag_geo_location
suffix = var.is_sandbox_mode_enabled == true ? "-${random_id.suffix.hex}" : ""
providers = {
oci = oci.home_region
}
}