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

aws_waf_byte_match_set requires field_to_match 'data' when using 'URI' type #1069

Closed
lukerosser opened this issue Jul 6, 2017 · 4 comments
Closed
Labels
bug Addresses a defect in current functionality.

Comments

@lukerosser
Copy link

Terraform Version

terraform -v
Terraform v0.9.11

Affected Resource(s)

Please list the resources as a list, for example:

  • aws_waf_byte_match_set

Terraform Configuration Files

resource "aws_waf_byte_match_set" "secure_magento_urls" {
name = "waf-magento-urls"

byte_match_tuples = [
{
field_to_match {
type = "URI"
}
text_transformation = "LOWERCASE"
target_string = "/rss/catalog/review"
positional_constraint = "STARTS_WITH"
},
{
field_to_match {
type = "URI"
}
text_transformation = "LOWERCASE"
target_string = "/index.php/rss/catalog/review"
positional_constraint = "STARTS_WITH"
},
{
field_to_match {
type = "URI"
}
text_transformation = "LOWERCASE"
target_string = "/rss/catalog/notifystock"
positional_constraint = "STARTS_WITH"
},
{
field_to_match {
type = "URI"
}
text_transformation = "LOWERCASE"
target_string = "/index.php/rss/catalog/notifystock"
positional_constraint = "STARTS_WITH"
}
]
}

Expected Behavior

Successful apply.

Actual Behavior

  • aws_waf_byte_match_set.secure_magento_urls: [ERROR] Error updating ByteMatchSet: [ERROR] Error updating ByteMatchSet: ValidationException: 4 validation errors detected: Value '' at 'updates.1.member.matchTuple.field.data' failed to satisfy constraint: Member must have length greater than or equal to 1; Value '' at 'updates.2.member.matchTuple.field.data' failed to satisfy constraint: Member must have length greater than or equal to 1; Value '' at 'updates.3.member.matchTuple.field.data' failed to satisfy constraint: Member must have length greater than or equal to 1; Value '' at 'updates.4.member.matchTuple.field.data' failed to satisfy constraint: Member must have length greater than or equal to 1
    status code: 400, request id: 1f905ce1-6236-11e7-b001-5f2ac51ee968

Errors due to missing 'data' value. field_to_match 'data' should be optional when using anything but 'HEADER' as the type:

https://www.terraform.io/docs/providers/aws/r/waf_byte_match_set.html#data

Confirmed this applies successfully by adding a 'data' value within field_to_match.

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. terraform apply
@nicwise
Copy link
Contributor

nicwise commented Jul 13, 2017

Same issue as #1107

@radeksimko radeksimko added the bug Addresses a defect in current functionality. label Jul 16, 2017
@radeksimko
Copy link
Member

Closing as duplicate of #966

Full explanation in #966 (comment)
Bugfix was shipped with version 0.1.2 of this provider.

@radeksimko radeksimko marked this as a duplicate of #966 Jul 16, 2017
@s-nakka
Copy link

s-nakka commented Dec 15, 2017

its working on v0.11.1 but more new issues

@ghost
Copy link

ghost commented Apr 10, 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 Apr 10, 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.
Projects
None yet
Development

No branches or pull requests

4 participants