Skip to content

Commit

Permalink
Disable provider role assumption if enabled is false (#56)
Browse files Browse the repository at this point in the history
* Check if enabled

* Update requester.tf
  • Loading branch information
nitrocode committed Nov 22, 2021
1 parent 93d3a0b commit 0cad62a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion accepter.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ provider "aws" {
skip_metadata_api_check = var.skip_metadata_api_check

dynamic "assume_role" {
for_each = var.accepter_aws_assume_role_arn != "" ? ["true"] : []
for_each = local.enabled && var.accepter_aws_assume_role_arn != "" ? ["true"] : []
content {
role_arn = var.accepter_aws_assume_role_arn
}
Expand Down
2 changes: 1 addition & 1 deletion requester.tf
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ provider "aws" {
skip_metadata_api_check = var.skip_metadata_api_check

dynamic "assume_role" {
for_each = var.requester_aws_assume_role_arn != "" ? ["true"] : []
for_each = local.enabled && var.requester_aws_assume_role_arn != "" ? ["true"] : []
content {
role_arn = var.requester_aws_assume_role_arn
}
Expand Down

0 comments on commit 0cad62a

Please sign in to comment.