Skip to content

Commit

Permalink
Better example with usage of policy
Browse files Browse the repository at this point in the history
  • Loading branch information
grzesjam committed Sep 10, 2021
1 parent 72793bf commit bfc7df7
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions modules/oracle-container-registry/example/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,34 @@ module "container_registry_api_php" {
container_repository_is_immutable = false
container_repository_is_public = false
}

module "container_registry_spa" {
source = "./.."

compartment_id = local.tenancy
project_name = local.project_name
environment = local.environment
region = "me-jeddah-1"
suffix = "spa"

group_name_for_permission = "${local.project_name}-${local.environment}-CICD"
container_repository_is_immutable = false
container_repository_is_public = false
}

module "user" {
source = "../../oracle-user"

tenancy_ocid = local.tenancy
compartment_id = local.tenancy
environment = local.environment
user_name = "${local.project_name}-${local.environment}-CICD"
group_name = "${local.project_name}-${local.environment}-CICD"
create_auth_tokens = true

policy_name = "${local.project_name}-${local.environment}-access-to-cr"
policy_statements = flatten([
module.container_registry_api_php.policy,
module.container_registry_spa.policy
])
}

0 comments on commit bfc7df7

Please sign in to comment.