terraform-aws-waf icon indicating copy to clipboard operation
terraform-aws-waf copied to clipboard

The example provided for the WAF module gives error when executed using terraform.

Open askanonymous opened this issue 2 years ago • 1 comments

Below are the list of errors seen when we do a terraform plan.

$ terraform plan var.region Enter a value: ap-south-1

╷ │ Warning: Argument is deprecated │ │ with module.waf.aws_wafv2_web_acl.default[0], │ on ....\rules.tf line 85, in resource "aws_wafv2_web_acl" "default": │ 85: resource "aws_wafv2_web_acl" "default" { │ │ Use rule_action_override instead

│ Error: expected length of name to be in the range (1 - 128), got │ │ with module.waf.aws_wafv2_web_acl.default[0], │ on ....\rules.tf line 88, in resource "aws_wafv2_web_acl" "default": │ 88: name = module.this.id │ ╵ ╷ │ Error: invalid value for name (must contain only alphanumeric hyphen and underscore characters) │ │ with module.waf.aws_wafv2_web_acl.default[0], │ on ....\rules.tf line 88, in resource "aws_wafv2_web_acl" "default": │ 88: name = module.this.id │ ╵ ╷ │ Error: expected length of visibility_config.0.metric_name to be in the range (1 - 128), got │ │ with module.waf.aws_wafv2_web_acl.default[0], │ on ....\rules.tf line 107, in resource "aws_wafv2_web_acl" "default": │ 107: metric_name = lookup(var.visibility_config, "metric_name", module.this.id) │ ╵ ╷ │ Error: invalid value for visibility_config.0.metric_name (must contain only alphanumeric hyphen and underscore characters) │ │ with module.waf.aws_wafv2_web_acl.default[0], │ on ....\rules.tf line 107, in resource "aws_wafv2_web_acl" "default": │ 107: metric_name = lookup(var.visibility_config, "metric_name", module.this.id)

Attaching screenshots :

image

askanonymous avatar Feb 16 '23 20:02 askanonymous