Closed Mazon closed 3 years ago
If trying other version like 1.4.1
i get another error
Error: Invalid dynamic for_each value
on main.tf line 23, in resource "aws_wafv2_web_acl" "main":
23: for_each = var.rules
|----------------
| var.rules is "[{\"managed_rule_group_statement\":{\"excluded_rule\":[\"SizeRestrictions_QUERYSTRING\",\"SizeRestrictions_BODY\",\"GenericRFI_QUERYARGUMENTS\"],\"name\":\"AWSManagedRulesCommonRuleSet\",\"vendor_name\":\"AWS\"},\"name\":\"AWSManagedRulesCommonRuleSet-rule-1\",\"override_action\":\"none\",\"priority\":\"1\",\"visibility_config\":{\"metric_name\":\"AWSManagedRulesCommonRuleSet-metric\"}},{\"managed_rule_group_statement\":{\"name\":\"AWSManagedRulesKnownBadInputsRuleSet\",\"vendor_name\":\"AWS\"},\"name\":\"AWSManagedRulesKnownBadInputsRuleSet-rule-2\",\"override_action\":\"count\",\"priority\":\"2\",\"visibility_config\":{\"metric_name\":\"AWSManagedRulesKnownBadInputsRuleSet-metric\"}},{\"managed_rule_group_statement\":{\"name\":\"AWSManagedRulesPHPRuleSet\",\"vendor_name\":\"AWS\"},\"name\":\"AWSManagedRulesPHPRuleSet-rule-3\",\"priority\":\"3\",\"visibility_config\":{\"cloudwatch_metrics_enabled\":false,\"metric_name\":\"AWSManagedRulesPHPRuleSet-metric\",\"sampled_requests_enabled\":false}}]"
Cannot use a string value in for_each. An iterable collection is required.
versions Terraform v0.13.5 terragrunt version v0.25.5
I am guessing that it is related to
Note that because the values are being passed in with environment variables and json, the type information is lost when crossing the boundary between Terragrunt and Terraform.
got it working mostly with type = list
in variables.tf for rules for the type information.
Hello guys, could you be so kind specifying type = any
in variables.tf for rules? It fixes the issue when using Terragrunt.
@Artemkulish upgrade to version 2.0.0 of this module where this is fixed.
I am getting this error
trying to use with terragrunt and pinned to version 1.5.0.
Maybe doing somethign wrong.
My file looks similar to your example except
In top.