Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
badra001 committed May 21, 2021
1 parent 07541b4 commit a97d218
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion config/config_rules.tf
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,12 @@ resource "aws_config_config_rule" "config_rules" {
locals {
crules_stopped = [
{
name = "ec2-stopped-24h"
rule = "EC2_STOPPED_INSTANCE"
parameter = jsonencode({ AllowedDays = "1" })
},
{
name = "ec2-stopped-30d"
rule = "EC2_STOPPED_INSTANCE"
parameter = jsonencode({ AllowedDays = "30" })
}
Expand All @@ -43,7 +45,7 @@ locals {
}

resource "aws_config_config_rule" "config_rules_stopped" {
for_each = { for cr in local.crules_stopped : cr.rule => cr }
for_each = { 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 a97d218

Please sign in to comment.