[ERROR] Error updating ByteMatchSet: [ERROR] Error updating ByteMatchSet: WAFInvalidOperationException: Operation is invalid for this entity. #2681
Labels
bug
Addresses a defect in current functionality.
service/waf
Issues and PRs that pertain to the waf service.
stale
Old or inactive issues managed by automation, if no further action taken these will get closed.
Hi there,
Thank you for opening an issue. Please note that we try to keep the Terraform issue tracker reserved for bug reports and feature requests. For general usage questions, please see: https://www.terraform.io/community.html.
Terraform Version
Run
terraform -v
to show the version. If you are not running the latest version of Terraform, please upgrade because your issue may have already been fixed.terraform -v
Terraform v0.11.1
Affected Resource(s)
Please list the resources as a list, for example:
resource "aws_waf_byte_match_set"
byte_match_tuples {
text_transformation = "NONE"
target_string = "/abcd.js"
positional_constraint = "EXACTLY"
}
If this issue appears to affect multiple resources, it may be an issue with Terraform's core, so please mention this.
Terraform Configuration Files
byte_match_tuples {
text_transformation = "NONE"
target_string = "/abcd.js"
positional_constraint = "EXACTLY"
}
Expected Behavior
What should have happened?
Terraform plan and apply should add the URI to AWS WAF "String and regex matching" condition for specific ID.
Actual Behavior
What actually happened?
I have aws_waf_byte_match_set to add a URI to be blocked. Initially when I ran this on V0.9.11 I ran into DATA issue. I upgraded to 0.11.1 to overcome the DATA issue mentioned in #1069 but I am seeing some weird things after upgrade. terraform plan and apply goes fine but I don't see the changes on the aws resource. I tried to delete the entry and ran plan and apply and re-add the entry and run plan and apply. even though there is no entry on the aws resource side it keep on complaining about WAFInvalidOperationException. I see it in that we get this sort of error when we try to re-add the entry thats already available. but in my case thats not.
2017-12-15T09:02:04.748-0800 [DEBUG] plugin.terraform-provider-aws_v1.5.0_x4: -----------------------------------------------------
2017-12-15T09:02:05.321-0800 [DEBUG] plugin.terraform-provider-aws_v1.5.0_x4: 2017/12/15 09:02:05 [DEBUG] [aws-sdk-go] DEBUG: Response waf/UpdateByteMatchSet Details:
2017-12-15T09:02:05.321-0800 [DEBUG] plugin.terraform-provider-aws_v1.5.0_x4: ---[ RESPONSE ]--------------------------------------
2017-12-15T09:02:05.321-0800 [DEBUG] plugin.terraform-provider-aws_v1.5.0_x4: HTTP/1.1 400 Bad Request
2017-12-15T09:02:05.321-0800 [DEBUG] plugin.terraform-provider-aws_v1.5.0_x4: Connection: close
2017-12-15T09:02:05.321-0800 [DEBUG] plugin.terraform-provider-aws_v1.5.0_x4: Content-Length: 91
2017-12-15T09:02:05.321-0800 [DEBUG] plugin.terraform-provider-aws_v1.5.0_x4: Content-Type: application/x-amz-json-1.1
2017-12-15T09:02:05.321-0800 [DEBUG] plugin.terraform-provider-aws_v1.5.0_x4: Date: Fri, 15 Dec 2017 17:02:00 GMT
2017-12-15T09:02:05.321-0800 [DEBUG] plugin.terraform-provider-aws_v1.5.0_x4: X-Amzn-Requestid: ab42a433-e1b9-11e7-8c3e-b1965ced61b4
2017-12-15T09:02:05.321-0800 [DEBUG] plugin.terraform-provider-aws_v1.5.0_x4:
2017-12-15T09:02:05.321-0800 [DEBUG] plugin.terraform-provider-aws_v1.5.0_x4:
2017-12-15T09:02:05.321-0800 [DEBUG] plugin.terraform-provider-aws_v1.5.0_x4: -----------------------------------------------------
2017-12-15T09:02:05.321-0800 [DEBUG] plugin.terraform-provider-aws_v1.5.0_x4: 2017/12/15 09:02:05 [DEBUG] [aws-sdk-go] {"__type":"WAFInvalidOperationException","message":"Operation is invalid for this entity."}
2017-12-15T09:02:05.321-0800 [DEBUG] plugin.terraform-provider-aws_v1.5.0_x4: 2017/12/15 09:02:05 [DEBUG] [aws-sdk-go] DEBUG: Validate Response waf/UpdateByteMatchSet failed, not retrying, error WAFInvalidOperationException: Operation is invalid for this entity.
Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
terraform apply
The text was updated successfully, but these errors were encountered: