Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(CSVDIES-9980): pass ExternalId at assume-role; default to sc-aut…
…omation-codebuild-role
Two related changes to wire the executor to the new cross-account role
deployed by the terraform-service-catalog-census StackSet (PR #13):
1. CROSS_ACCOUNT_ROLE default changed from r-inf-terraform to
sc-automation-codebuild-role — the new purpose-built role for this
automation system, deployed org-wide via CFN StackSet.
2. --external-id "${TARGET_ACCOUNT_ID}" added to the aws sts assume-role
call — required by the ExternalId condition on sc-automation-codebuild-role
(sts:ExternalId = AWS::AccountId) per ADR-004 confused-deputy protection.
The r-inf-terraform role can still be used by passing CROSS_ACCOUNT_ROLE=r-inf-terraform
as an env var override; it is not removed from the CodeBuild IAM policy.
See ADR-004: docs/decisions/004-account-baseline-iam-role.md
Jira: CSVDIES-9980- Loading branch information