Skip to content

Commit

Permalink
fix(policy): add policy on tenant level (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
jose-pablo-camacho authored Dec 11, 2024
1 parent 76061bd commit cf17513
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
5 changes: 1 addition & 4 deletions modules/config-posture/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,7 @@ resource "oci_identity_policy" "admit_cspm_policy" {
statements = [
"Define tenancy sysdigTenancy as ${data.sysdig_secure_trusted_oracle_app.config_posture.tenancy_ocid}",
"Define group configPostureGroup as ${data.sysdig_secure_trusted_oracle_app.config_posture.group_ocid}",
var.compartment_ocid != "" ?
"Admit group configPostureGroup of tenancy sysdigTenancy to read all-resources in compartment ${data.oci_identity_compartment.compartment[0].name}"
:
"Admit group configPostureGroup of tenancy sysdigTenancy to read all-resources in tenancy",
"Admit group configPostureGroup of tenancy sysdigTenancy to read all-resources in tenancy",
]
}

Expand Down
5 changes: 1 addition & 4 deletions modules/onboarding/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,7 @@ resource "oci_identity_policy" "admit_onboarding_policy" {
"Define tenancy sysdigTenancy as ${data.sysdig_secure_trusted_oracle_app.onboarding.tenancy_ocid}",
"Define group onboardingGroup as ${data.sysdig_secure_trusted_oracle_app.onboarding.group_ocid}",
"Admit group onboardingGroup of tenancy sysdigTenancy to inspect tenancies in tenancy",
var.compartment_ocid != "" ?
"Admit group onboardingGroup of tenancy sysdigTenancy to inspect compartments in compartment ${data.oci_identity_compartment.compartment[0].name}"
:
"Admit group onboardingGroup of tenancy sysdigTenancy to inspect compartments in tenancy",
"Admit group onboardingGroup of tenancy sysdigTenancy to inspect compartments in tenancy",
]
}

Expand Down

0 comments on commit cf17513

Please sign in to comment.