Skip to content

Commit

Permalink
code in enable of crules
Browse files Browse the repository at this point in the history
  • Loading branch information
badra001 committed May 24, 2021
1 parent d568c68 commit 06c9bbf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions config/config_rules.tf
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ locals {
}

resource "aws_config_config_rule" "config_rules" {
for_each = toset(local.crules)
for_each = var.enable_config_rules_standard ? toset(local.crules) : {}
name = format("inf-config-rule_%v", each.key)
source {
owner = "AWS"
Expand Down Expand Up @@ -45,7 +45,7 @@ locals {
}

resource "aws_config_config_rule" "config_rules_stopped" {
for_each = { for cr in local.crules_stopped : cr.name => cr }
for_each = var.enable_config_rules_stopped ? { for cr in local.crules_stopped : cr.name => cr } : {}
name = format("inf-config-rule_%v", each.key)
source {
owner = "AWS"
Expand Down

0 comments on commit 06c9bbf

Please sign in to comment.