How do you scope IAM for the Terraform deploy role?
IntermediateProductionSecurity, Secrets and Access
Answer
Start from a role per stack or per account with only the services that stack manages, add permission boundaries to stop it creating roles more powerful than itself and conditions on region and tags. Use a read-only role for plan. Generate a first draft from CloudTrail (IAM Access Analyzer policy generation), then tighten. Avoid AdministratorAccess on shared pipelines, except the break-glass role.
More on Security, Secrets and Access
How do you avoid hardcoded credentials in Terraform?BeginnerIs reading a secret with a data source safe?IntermediateHow do ephemeral resources and write-only arguments keep secrets out of state?AdvancedWhat is the better pattern for RDS master passwords?BeginnerWhat are dynamic provider credentials in HCP Terraform?IntermediateHow do you defend against supply-chain risk in providers and modules?Advanced