mirror of
https://github.com/kittywitch/nixfiles.git
synced 2026-02-09 20:39:18 -08:00
21 lines
730 B
HCL
21 lines
730 B
HCL
locals {
|
|
policy_multi_line_statement = <<EOF
|
|
Allow group ${oci_identity_group.this.name} to manage vcns in compartment id ${var.tenancy_ocid} where ALL {
|
|
ANY { request.operation = 'CreateNetworkSecurityGroup', request.operation = 'DeleteNetworkSecurityGroup' }
|
|
}
|
|
EOF
|
|
|
|
}
|
|
|
|
resource "oci_identity_policy" "terraform-admin" {
|
|
compartment_id = var.tenancy_ocid
|
|
|
|
name = "terraform-admin"
|
|
description = "terraform-admin"
|
|
|
|
statements = [
|
|
"Allow group ${oci_identity_group.this.name} to manage all-resources in compartment id ${local.child_compartment_id}",
|
|
"Allow group ${oci_identity_group.this.name} to read virtual-network-family in compartment id ${var.tenancy_ocid}",
|
|
local.policy_multi_line_statement,
|
|
]
|
|
}
|