terraform-aws-waf
terraform-aws-waf copied to clipboard
ID as name issue on example
Describe the Bug
I'm trying to run the examples/complete scripts but facing the following error:
Terraform planned the following actions, but then encountered a problem:
# module.waf.aws_wafv2_ip_set.default["rule-110-ip-set"] will be created
+ resource "aws_wafv2_ip_set" "default" {
+ addresses = [
+ "17.0.0.0/8",
]
+ arn = (known after apply)
+ id = (known after apply)
+ ip_address_version = "IPV4"
+ lock_token = (known after apply)
+ name = "rule-110-ip-set"
+ scope = "REGIONAL"
+ tags_all = (known after apply)
}
Plan: 1 to add, 0 to change, 0 to destroy.
╷
│ 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 96, in resource "aws_wafv2_web_acl" "default":
│ 96: 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 96, in resource "aws_wafv2_web_acl" "default":
│ 96: name = module.this.id
│
╵
Adding the name
variable no issues occur:
module "waf" {
source = "../.."
name = "test-waf"
Expected Behavior
The example should run without issues.
Steps to Reproduce
git clone [email protected]:terraform-aws-modules/terraform-aws-alb.git
cd terraform-aws-waf/examples/complete
terraform init
terraform apply
Screenshots
No response
Environment
No response
Additional Context
No response