-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DR2-2007 Remove mgmt terraform roles and use account ones. #38
Conversation
This deletes the management roles which assumed the roles in the environment accounts and updates the trust policies on those accounts to allow GitHub to run them. It also updates the bucket policy for the state bucket and the resource policy for the lock table.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Just 2 minor comments
], | ||
"Effect": "Allow", | ||
"Resource": [ | ||
"arn:aws:s3:::mgmt-dp-terraform-state", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it fine that we're hardcoding mgmt
here and below?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, there's only one state bucket and it's in the management account.
terraform_external_id = module.terraform_config.terraform_config["intg"]["terraform_external_id"] | ||
terraform_github_role_arn = module.terraform_github_terraform_environments["intg"].role_arn | ||
management_developer_role_arn = data.aws_ssm_parameter.dev_admin_role.value | ||
source = "./environment_roles" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the source be adding to a local variable since it's used 4 times?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just tried it, terraform won't let you. A lot of people want it but they say no.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
This deletes the management roles which assumed the roles in the
environment accounts and updates the trust policies on those accounts to
allow GitHub to run them.
It also updates the bucket policy for the state bucket and the resource
policy for the lock table.
This will need nationalarchives/da-terraform-modules#82 to be merged
before this can be deployed.