Skip to content

Commit

Permalink
read-only resman sa roles
Browse files Browse the repository at this point in the history
  • Loading branch information
ludoo committed Dec 18, 2023
1 parent c0bccf6 commit 42df43c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
8 changes: 8 additions & 0 deletions fast/stages/0-bootstrap/automation.tf
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,14 @@ module "automation-tf-resman-r-sa" {
}
}
)
# we grant organization roles here as IAM bindings have precedence over
# custom roles in the organization module, so these need to depend on it
iam_organization_roles = {
(var.organization.id) = [
module.organization.custom_role_id["organization_admin_viewer"],
module.organization.custom_role_id["tag_viewer"]
]
}
iam_storage_roles = {
(module.automation-tf-output-gcs.name) = [module.organization.custom_role_id["storage_viewer"]]
}
Expand Down
3 changes: 2 additions & 1 deletion fast/stages/0-bootstrap/organization-iam.tf
Original file line number Diff line number Diff line change
Expand Up @@ -115,13 +115,13 @@ locals {
}
(module.automation-tf-bootstrap-r-sa.iam_email) = {
authoritative = [
# the organizationAdminViewer custom role is granted via the SA module
"roles/logging.viewer",
"roles/resourcemanager.folderViewer",
"roles/resourcemanager.tagViewer"
]
additive = concat(
[
# the organizationAdminViewer custom role is granted via the SA module
"roles/iam.organizationRoleViewer",
"roles/orgpolicy.policyViewer"
],
Expand Down Expand Up @@ -155,6 +155,7 @@ locals {
]
additive = concat(
[
# the organizationAdminViewer custom role is granted via the SA module
"roles/orgpolicy.policyViewer"
],
local.billing_mode != "org" ? [] : [
Expand Down

0 comments on commit 42df43c

Please sign in to comment.