Skip to content

Commit

Permalink
Fix: resource attributes that cannot be determined (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
nitrocode committed May 18, 2021
1 parent de13762 commit 4a99804
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@ data "aws_iam_policy_document" "this" {
}

resource "aws_organizations_policy" "this" {
count = module.this.enabled && length(local.statements) > 0 ? 1 : 0
count = module.this.enabled && length(var.service_control_policy_statements) > 0 ? 1 : 0
name = module.this.id
description = var.service_control_policy_description
content = local.service_control_policy_json
tags = module.this.tags
}

resource "aws_organizations_policy_attachment" "this" {
count = module.this.enabled && length(local.statements) > 0 ? 1 : 0
count = module.this.enabled && length(var.service_control_policy_statements) > 0 ? 1 : 0
policy_id = join("", aws_organizations_policy.this.*.id)
target_id = var.target_id
}

0 comments on commit 4a99804

Please sign in to comment.