Created
April 21, 2021 12:34
-
-
Save swade1987/a2d0d3da166bc636f1fdfb17f924e123 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data "aws_iam_policy_document" "this" { | |
statement { | |
actions = [ | |
"sts:AssumeRole" | |
] | |
resources = [ | |
"arn:aws:iam::${data.terraform_remote_state.accounts.outputs.account_ids["terraform-state"]}:role/terraform-state-*", | |
"arn:aws:iam::*:role/terraform-runner", | |
] | |
} | |
} | |
resource "aws_iam_role_policy" "this" { | |
name = "terraform-assume-roles" | |
policy = data.aws_iam_policy_document.this.json | |
role = module.atlantis.task_role_name | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment