Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ERROR] Error updating ByteMatchSet: [ERROR] Error updating ByteMatchSet: WAFInvalidOperationException: Operation is invalid for this entity. #2681

Closed
s-nakka opened this issue Dec 15, 2017 · 2 comments
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.

Comments

@s-nakka
Copy link

s-nakka commented Dec 15, 2017

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

  • provider.aws v1.5.0

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"

field_to_match {
  type = "URI"
}

}
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"

field_to_match {
  type = "URI"
}

}

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:

  1. terraform apply
@apparentlymart apparentlymart added the bug Addresses a defect in current functionality. label Dec 20, 2017
@radeksimko radeksimko added the service/waf Issues and PRs that pertain to the waf service. label Jan 28, 2018
@github-actions
Copy link

Marking this issue as stale due to inactivity. This helps our maintainers find and focus on the active issues. If this issue receives no comments in the next 30 days it will automatically be closed. Maintainers can also remove the stale label.

If this issue was automatically closed and you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thank you!

@github-actions github-actions bot added the stale Old or inactive issues managed by automation, if no further action taken these will get closed. label Mar 28, 2020
@ghost
Copy link

ghost commented May 28, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked and limited conversation to collaborators May 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
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.
Projects
None yet
Development

No branches or pull requests

3 participants