You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: compartments/examples/vision/README.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# OCI Landing Zones IAM Compartments Module Example - Vision compartments
2
2
3
-
This example shows how to deploy Identity and Access Management (IAM) compartments in Oracle Cloud Infrastructure (OCI) for a hypothetical Vision entity. The sample topology is the same one deployed by [OCI Base Landing Zone](https://github.com/oracle-quickstart/oci-cis-landingzone-quickstart).
3
+
This example shows how to deploy Identity and Access Management (IAM) compartments in Oracle Cloud Infrastructure (OCI) for a hypothetical Vision entity. The sample topology is the same one deployed by [OCI Core Landing Zone](https://github.com/oci-landing-zones/terraform-oci-core-landingzone).
4
4
5
5
It creates the compartment topology as shown in the picture below:
6
6
@@ -23,6 +23,8 @@ Refer to [compartment's module README.md](../../README.md) for overall attribute
23
23
24
24
*TOP-CMP* defines two tag defaults. *COST-CENTER-TAG-DEFAULT* will automatically apply value "a1" to any resources created in *TOP-CMP* compartment and sub-compartments. *ENVIRONMENT-TAG-DEFAULT* will automatically require that users provide a value when creating resources in *TOP-CMP* compartment and sub-compartments.
25
25
26
+
The *cislz* and *cislz-cmp-type* freeform tags assigned to each compartment are used as lookups by [Template Policies Example](https://github.com/oci-landing-zones/terraform-oci-modules-iam/tree/main/policies/examples/template-policies).
27
+
26
28
**Note**: If the *automation_config* variable is provided, the example writes the compartments output to the specified OCI Object Storage bucket (write permissions are required on the bucket). The example can be easily changed to write the output to a local file instead. The output can be further used by another module that depends on these compartments.
27
29
28
30
3. In this folder, run the typical Terraform workflow:
Copy file name to clipboardExpand all lines: policies/examples/template-policies/README.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,9 +2,9 @@
2
2
3
3
## Introduction
4
4
5
-
This example shows how to use [OCI Landing Zones IAM policy module](../..) to manage policies that are generated based on metadata that is associated to existing compartments. A matching compartments example is available at https://github.com/oracle-quickstart/terraform-oci-cis-landing-zone-iam-modules/compartments/examples/vision.
5
+
This example shows how to use [OCI Landing Zones IAM policy module](../..) to manage policies that are generated based on metadata that is associated to existing compartments. A matching compartments example is available at https://github.com/oci-landing-zones/terraform-oci-modules-iam/tree/main/compartments/examples/vision.
6
6
7
-
For compartment level policies (excluding Root compartment), the target compartments are obtained from a data source whose output is filtered based on freeform tag "cislz" with value "vision". The returned compartments are passed to the policy module via the *supplied_compartments* attribute. Each returned compartment is associated with metadata for appropriate policy generation based on the freeform tag "cislz-cmp-type" applied to each compartment.
7
+
For compartment level policies (excluding Root compartment), the target compartments are obtained from a data source whose output is filtered based on freeform tag "cislz" with value "template-policies-example". The returned compartments are passed to the policy module via the *supplied_compartments* attribute. Each returned compartment is associated with metadata for appropriate policy generation based on the freeform tag "cislz-cmp-type" applied to each compartment.
8
8
9
9
For tenancy level policies (policies attached to Root compartment), a list of group names with their respective roles are passed to the module via the *groups_with_tenancy_level_roles* attribute.
Copy file name to clipboardExpand all lines: policies/examples/template-policies/main.tf
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -74,8 +74,8 @@ locals {
74
74
name : cmp.name,
75
75
id : cmp.id,
76
76
cislz_metadata : local.cislz_compartments_metadata[cmp.freeform_tags["cislz-cmp-type"]] #-- This example expects compartments to be freeform tagged with "cislz-cmp-type", so it can figure out the compartments intent and associate it with the appropriate metadata.
77
-
}
78
-
iflookup(cmp.freeform_tags, "cislz","") =="vision"#-- The compartments we are interested are freeform tagged as {"cislz" : "vision"} but you could identify the compartments through some other attributes that makes sense to your deployment.
77
+
}
78
+
iflookup(cmp.freeform_tags, "cislz","") =="template-policies-example"#-- The compartments we are interested are freeform tagged as {"cislz" : "template-policies-example"} but you could identify the compartments through some other attributes that makes sense to your deployment.
"allow group ${local.auditor_group_names} to inspect all-resources in tenancy",
130
-
"allow group ${local.auditor_group_names} to read instances in tenancy",
131
-
"allow group ${local.auditor_group_names} to read load-balancers in tenancy",
132
-
"allow group ${local.auditor_group_names} to read buckets in tenancy",
133
-
"allow group ${local.auditor_group_names} to read nat-gateways in tenancy",
134
-
"allow group ${local.auditor_group_names} to read public-ips in tenancy",
135
-
"allow group ${local.auditor_group_names} to read file-family in tenancy",
136
-
"allow group ${local.auditor_group_names} to read instance-configurations in tenancy",
137
-
"allow group ${local.auditor_group_names} to read network-security-groups in tenancy",
138
-
"allow group ${local.auditor_group_names} to read resource-availability in tenancy",
139
-
"allow group ${local.auditor_group_names} to read audit-events in tenancy",
140
-
"allow group ${local.auditor_group_names} to read users in tenancy",
141
-
"allow group ${local.auditor_group_names} to use cloud-shell in tenancy",
142
-
"allow group ${local.auditor_group_names} to read vss-family in tenancy",
143
-
"allow group ${local.auditor_group_names} to read usage-budgets in tenancy",
144
-
"allow group ${local.auditor_group_names} to read usage-reports in tenancy",
145
-
"allow group ${local.auditor_group_names} to read data-safe-family in tenancy",
146
-
"allow group ${local.auditor_group_names} to read vaults in tenancy",
147
-
"allow group ${local.auditor_group_names} to read keys in tenancy",
148
-
"allow group ${local.auditor_group_names} to read tag-namespaces in tenancy",
149
-
"allow group ${local.auditor_group_names} to use ons-family in tenancy where any {request.operation!=/Create*/, request.operation!=/Update*/, request.operation!=/Delete*/, request.operation!=/Change*/}"
138
+
"allow group ${local.auditor_group_names} to inspect all-resources in tenancy",
139
+
"allow group ${local.auditor_group_names} to read instances in tenancy",
140
+
"allow group ${local.auditor_group_names} to read load-balancers in tenancy",
141
+
"allow group ${local.auditor_group_names} to read buckets in tenancy",
142
+
"allow group ${local.auditor_group_names} to read nat-gateways in tenancy",
143
+
"allow group ${local.auditor_group_names} to read public-ips in tenancy",
144
+
"allow group ${local.auditor_group_names} to read file-family in tenancy",
145
+
"allow group ${local.auditor_group_names} to read instance-configurations in tenancy",
146
+
"allow group ${local.auditor_group_names} to read network-security-groups in tenancy",
147
+
"allow group ${local.auditor_group_names} to read resource-availability in tenancy",
148
+
"allow group ${local.auditor_group_names} to read audit-events in tenancy",
149
+
"allow group ${local.auditor_group_names} to read users in tenancy",
150
+
"allow group ${local.auditor_group_names} to use cloud-shell in tenancy",
151
+
"allow group ${local.auditor_group_names} to read vss-family in tenancy",
152
+
"allow group ${local.auditor_group_names} to read usage-budgets in tenancy",
153
+
"allow group ${local.auditor_group_names} to read usage-reports in tenancy",
154
+
"allow group ${local.auditor_group_names} to read data-safe-family in tenancy",
155
+
"allow group ${local.auditor_group_names} to read vaults in tenancy",
156
+
"allow group ${local.auditor_group_names} to read keys in tenancy",
157
+
"allow group ${local.auditor_group_names} to read tag-namespaces in tenancy",
158
+
"allow group ${local.auditor_group_names} to use ons-family in tenancy where any {request.operation!=/Create*/, request.operation!=/Update*/, request.operation!=/Delete*/, request.operation!=/Change*/}",
159
+
"allow group ${local.auditor_group_names} to read zpr-configuration in tenancy",
160
+
"allow group ${local.auditor_group_names} to read zpr-policy in tenancy",
161
+
"allow group ${local.auditor_group_names} to read security-attribute-namespace in tenancy",
162
+
"allow group ${local.auditor_group_names} to read network-firewall-family in tenancy"
0 commit comments