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

Documentation resource aws_waf_rule is wrong #2655

Closed
hegyre opened this issue Dec 13, 2017 · 2 comments · Fixed by #3275
Closed

Documentation resource aws_waf_rule is wrong #2655

hegyre opened this issue Dec 13, 2017 · 2 comments · Fixed by #3275
Labels
documentation Introduces or discusses updates to documentation. service/waf Issues and PRs that pertain to the waf service.

Comments

@hegyre
Copy link

hegyre commented Dec 13, 2017

Hi there,

Terraform Version

N/A

Affected Resource(s)

aws_waf_rule

Terraform Configuration Files

resource "aws_waf_rule" "waf_rule_pre_ca_cdn" {

  name        = "${var.project}-wafrule-pre-ca-cdn"
  metric_name = "${var.project}wafruleprecacdn"

  predicates {
    data_id = "${aws_waf_ipset.dcsie-wafipset-all-cdn.id}"
    negated = false
    type    = "IPSet"
  }

  predicates {
    data_id = "${aws_waf_ipset.waf_ipset_pre_ca_cdn.id}"
    negated = false
    type    = "IPMatch"
  }

Debug Output

  • aws_waf_rule.waf_rule_pre_ca_cdn: "predicates.0.type" must be one of IPMatch | ByteMatch | SqlInjectionMatch | SizeConstraint | XssMatch

Expected Behavior

Terraform AWS Provider is fine, but the doc is wrong

Actual Behavior

Doc is saying:
https://www.terraform.io/docs/providers/aws/r/waf_rule.html

Argument Reference:
predicates - (Optional) One of ByteMatchSet, IPSet, SizeConstraintSet, SqlInjectionMatchSet, or XssMatchSet objects to include in a rule.

Nested Blocks:
type - (Required) The type of predicate in a rule, such as ByteMatchSet or IPSet

It should be IPMatch, not IPSet, as per the example in the same doc.
Also, the Argument reference is IMHO wrong since it attempt a nested block, right ?

@hegyre hegyre changed the title Documentation resource waf_rule is wrong Documentation resource aws_waf_rule is wrong Dec 13, 2017
@apparentlymart apparentlymart added the documentation Introduces or discusses updates to documentation. label Dec 20, 2017
@apparentlymart
Copy link
Contributor

Thanks for reporting this, @hegyre!

Indeed it does look like there are two problems here: the list of supported predicate types is not correct, and predicates should be documented as being a nested block which is documented separately below.

@radeksimko radeksimko added the service/waf Issues and PRs that pertain to the waf service. label Jan 25, 2018
@ghost
Copy link

ghost commented Apr 7, 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 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Introduces or discusses updates to documentation. service/waf Issues and PRs that pertain to the waf service.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants