Skip to content

Commit 6344683

Browse files
authored
Merge pull request #21 from oracle-quickstart/release-0.1.8
Release 0.1.8
2 parents 7775ac3 + eef72dc commit 6344683

File tree

4 files changed

+25
-2
lines changed

4 files changed

+25
-2
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@
99
**/terraform.tfvars
1010
**/input.auto.tfvars
1111
**/private
12+
**/creds

RELEASE-NOTES.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# December 08, 2023 Release Notes - 0.1.8
2+
## Updates
3+
### Policy Module
4+
1. Grants added for supporting OKE deployments with NPN (Native Pod Networking) and in a split compartment topology, where OKE networking and OKE clusters are deployed in different compartments.
5+
16
# November 01, 2023 Release Notes - 0.1.7
27
## New
38
1. Identity Domains module, supporting identity domains, groups, and dynamic groups.

policies/application_cmp_policy.tf

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,12 @@ locals {
7878
] : []
7979
}
8080

81+
oke_cluster_grants_on_application_cmp_map = {
82+
for k, values in local.cmp_name_to_cislz_tag_map : k => (contains(split(",",values["cmp-type"]),"application")) && local.enable_oke_service_policies ? [
83+
"allow any-user to manage instances in compartment ${values["name"]} where all { request.principal.type = 'cluster', request.principal.compartment.id = '${values["ocid"]}' }"
84+
] : []
85+
}
86+
8187
#-- Policies for compartments marked as application compartments (values["cmp-type"] == "application").
8288
application_cmps_policies = {
8389
for k, values in local.cmp_name_to_cislz_tag_map :
@@ -89,7 +95,7 @@ locals {
8995
freeform_tags = var.policies_configuration.freeform_tags
9096
statements = concat(local.application_admin_grants_on_application_cmp_map[k],local.application_read_grants_on_application_cmp_map[k],
9197
local.storage_admin_grants_on_application_cmp_map[k],local.security_admin_grants_on_application_cmp_map[k],
92-
local.compute_agent_grants_on_application_cmp_map[k])
98+
local.compute_agent_grants_on_application_cmp_map[k],local.oke_cluster_grants_on_application_cmp_map[k])
9399
}
94100
if contains(split(",",values["cmp-type"]),"application")
95101
}

policies/network_cmp_policy.tf

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,16 @@ locals {
8888
] : []
8989
}
9090

91+
application_compartment_id = local.enable_oke_service_policies ? (distinct(compact(concat([for k, values in local.cmp_name_to_cislz_tag_map : (contains(split(",",values["cmp-type"]),"application")) ? values["ocid"] : ""])))[0]) : null
92+
93+
oke_cluster_grants_on_network_cmp_map = {
94+
for k, values in local.cmp_name_to_cislz_tag_map : k => (contains(split(",",values["cmp-type"]),"network")) && local.enable_oke_service_policies && local.application_compartment_id != null ? [
95+
"allow any-user to use private-ips in compartment ${values["name"]} where all { request.principal.type = 'cluster', request.principal.compartment.id = '${local.application_compartment_id}' }",
96+
"allow any-user to use network-security-groups in compartment ${values["name"]} where all { request.principal.type = 'cluster', request.principal.compartment.id = '${local.application_compartment_id}' }",
97+
"allow any-user to use subnets in compartment ${values["name"]} where all { request.principal.type = 'cluster', request.principal.compartment.id = '${local.application_compartment_id}' }"
98+
] : []
99+
}
100+
91101
#-- Policies for compartments marked as network compartments (values["cmp-type"] == "network").
92102
network_cmps_policies = {
93103
for k, values in local.cmp_name_to_cislz_tag_map :
@@ -100,7 +110,8 @@ locals {
100110
statements = concat(local.network_admin_grants_on_network_cmp_map[k],local.network_read_grants_on_network_cmp_map[k],
101111
local.security_admin_grants_on_network_cmp_map[k],local.appdev_admin_grants_on_network_cmp_map[k],
102112
#local.database_admin_grants_on_network_cmp_map[k],local.exainfra_admin_grants_on_network_cmp_map[k],
103-
local.common_admin_grants_on_network_cmp_map[k], local.storage_admin_grants_on_network_cmp_map[k])
113+
local.common_admin_grants_on_network_cmp_map[k], local.storage_admin_grants_on_network_cmp_map[k],
114+
local.oke_cluster_grants_on_network_cmp_map[k])
104115
}
105116
if contains(split(",",values["cmp-type"]),"network")
106117
}

0 commit comments

Comments
 (0)