Skip to content

Commit

Permalink
IAM role fails to create without SNS topic (#40)
Browse files Browse the repository at this point in the history
Co-authored-by: cloudpossebot <[email protected]>
  • Loading branch information
kevcube and cloudpossebot authored Nov 9, 2021
1 parent eca2889 commit c09b627
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,14 @@ module "iam_role" {

use_fullname = true

policy_documents = [
policy_documents = var.create_sns_topic ? [
data.aws_iam_policy_document.config_s3_policy[0].json,
data.aws_iam_policy_document.config_sns_policy[0].json
] : [
data.aws_iam_policy_document.config_s3_policy[0].json
]

policy_document_count = 2
policy_document_count = var.create_sns_topic ? 2 : 1
policy_description = "AWS Config IAM policy"
role_description = "AWS Config IAM role"

Expand Down

0 comments on commit c09b627

Please sign in to comment.