Using Read-Only User 'planner' for Terraform Plans #74
-
Hi guys, We're trying to grant a user permission to run Terraform locally with atmos, but in planning only mode, without the ability to apply any changes. However, we're having trouble getting Terraform to use the 'planner' role correctly. How should our configs be configured? At the moment, the user is encountering access errors related to the S3 backend. Here's the error message we're seeing: │ IAM Role (arn:aws:iam::312368642835:role/nsp-data-gbl-prod-terraform) cannot be assumed. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
If I understand correctly, you have assumed the Dynamic roles will need to be configured in your # stacks/catalog/account-map.yaml
components:
terraform:
account-map:
settings:
github:
actions_enabled: false
vars:
enabled: true
terraform_dynamic_role_enabled: true # <----- this line |
Beta Was this translation helpful? Give feedback.
-
Yes, dynamic roles are enabled. We are trying to add a new "data" team to access data accounts. We have new accounts created in the organization (aws-sso.yaml):
And added them to aws-teams
And aws-team-roles
When our employee tried to plan, he got the following error:
Did we add 'planners' to identity correctly? Are there any other steps that we need? |
Beta Was this translation helpful? Give feedback.
I see. Yes you added the the
data
team correctly to assume theplanner
team role, but you also need to grant thedata
permission to access Terraform State (arn:aws:iam::xxx:role/org-core-gbl-root-tfstate
)You'll need to add
data
tovar.allowed_roles
for your given terraform backend