I have successfully created some rules without errors but for this block I get an error. I have tried using non json rule format for the same exact rule below and it works just fine. I then copied json format of these rules from AWS WAF console to make sure my json formatting was correct and it still fails.
For my environments I have waf configured with 60+ rules and it makes it much easier to work with json while working on newer envs that require similar rules or while making sure live rules match up with our terraform. I am glad that rule_json is available now and I am working on migrating current wafs to terraform but hitting this error.
Terraform Core Version
v1.5.7
AWS Provider Version
v5.72.1
Affected Resource(s)
aws_wafv2_web_acl
Expected Behavior
aws_wafv2_web_acl.web_acl: Modifying...
aws_wafv2_web_acl.web_acl: Modifications complete after 1s
Actual Behavior
aws_wafv2_web_acl.web_acl: Modifying...
╷
│ Error: expanding WAFv2 WebACL JSON rule (xxxx): decoding JSON: illegal base64 data at input byte 7
│
│ with aws_wafv2_web_acl.web_acl,
│ on waf.tf line 14, in resource "aws_wafv2_web_acl" "web_acl":
│ 14: resource "aws_wafv2_web_acl" "web_acl" {
Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.
Volunteering to Work on This Issue
If you are interested in working on this issue, please leave a comment.
If this would be your first contribution, please review the contribution guide.
Description
I have successfully created some rules without errors but for this block I get an error. I have tried using non json rule format for the same exact rule below and it works just fine. I then copied json format of these rules from AWS WAF console to make sure my json formatting was correct and it still fails.
For my environments I have waf configured with 60+ rules and it makes it much easier to work with json while working on newer envs that require similar rules or while making sure live rules match up with our terraform. I am glad that rule_json is available now and I am working on migrating current wafs to terraform but hitting this error.
Terraform Core Version
v1.5.7
AWS Provider Version
v5.72.1
Affected Resource(s)
aws_wafv2_web_acl
Expected Behavior
aws_wafv2_web_acl.web_acl: Modifying... aws_wafv2_web_acl.web_acl: Modifications complete after 1s
Actual Behavior
aws_wafv2_web_acl.web_acl: Modifying... ╷ │ Error: expanding WAFv2 WebACL JSON rule (xxxx): decoding JSON: illegal base64 data at input byte 7 │ │ with aws_wafv2_web_acl.web_acl, │ on waf.tf line 14, in resource "aws_wafv2_web_acl" "web_acl": │ 14: resource "aws_wafv2_web_acl" "web_acl" {
Terraform Configuration Files
Would you like to implement a fix?
No