Skip to content

Releases: cloudposse/terraform-aws-waf

v1.0.0

12 Jul 18:46
bbc4a71
Compare
Choose a tag to compare
Refactor. Add missing features. Terraform `aws` provider v5 compatibility @aknysh (#45)

what

  • Refactor
  • Add missing features
  • Terraform aws provider v5 compatibility

why

related

v0.4.0

05 Jul 02:00
8cd5b36
Compare
Choose a tag to compare
feat: adds geo_allowlist_statement_rules variable and supporting rule @Gowiem (#34)

what

  • Adds the geo_allowlist_statement_rules variable and accompanying block
  • Updates to latest and greatest README + workflows via make github/init + make readme

why

  • This enables creating a rule that supports an allowlist of country codes instead of only supporting a blocklist via the existing geo_match_statement_rules. This is accomplished via the not_statement block that is used in the geo_allowlist_statement_rules rule block.
  • Gets this module up to latest and greatest changes.

references

  • N/A
Sync github @max-lobur (#35)

Rebuild github dir from the template

v0.3.0

17 May 09:03
c4b8760
Compare
Choose a tag to compare
  • No changes

v0.2.0

21 Mar 17:50
c4b8760
Compare
Choose a tag to compare
Adding CAPTCHA action support to all actions @vitali-federau-fivestars (#31)

what

  • Adding CAPTCHA action support
  • Bumping terraform and aws provider versions (as they are 2 years old)

why

  • In our mostly geo location rule we need captcha for people to be able to access the website
  • We had to use CAPTCHA in WAF rule but it was not supported

references

v0.1.0

07 Feb 21:28
a31a965
Compare
Choose a tag to compare
Stop replacing single_header & single_query_argument with an int @paulerickson (#19)

what

  • Some parts of statements get replaced by the number 1, resulting in an error when trying to access its name attribute

why

  • single_header and single_query_argument are unusable without a name attribute

references

  • closes #2
git.io->cloudposse.tools update @dylanbannon (#16)

what and why

Change all references to git.io/build-harness into cloudposse.tools/build-harness, since git.io redirects will stop working on April 29th, 2022.

References

  • DEV-143

v0.0.4

26 Apr 16:48
cc930d8
Compare
Choose a tag to compare

πŸš€ Enhancements

fix(regex-rule): bugfix for attribute lookup @dannyibishev (#13)

what

  • Added the right attribute lookup logic for the single_header and the single_query_argument blocks of code regarding the regex_pattern_set_reference_statement_rules dynamic block.

    This was done to rectify a misconfiguration and also follows the existing configuration design.

why

  • Attribute lookup failed for single_header. The following screenshot was the error I was receiving
β”‚  420:                     name = single_header.value.name
β”‚     β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚     β”‚ single_header.value is 1
β”‚
β”‚ Can't access attributes on a primitive-typed value (number).

FYI: Ignore the line number in the nippet. It's from an edited fork of your repo. But this bug does exist here as well

references

Similar issue to #10
closes #10

v0.0.3

23 Oct 03:08
d49bb7b
Compare
Choose a tag to compare

πŸ€– Automatic Updates

Update context.tf @cloudpossebot (#8)

what

This is an auto-generated PR that updates the context.tf file to the latest version from cloudposse/terraform-null-label

why

To support all the features of the context interface.

v0.0.2

24 Aug 20:09
ebc4d1c
Compare
Choose a tag to compare
Change redacted_fields variable type to map(any) @ian-bartholomew (#4)

what

  • Changes redacted_fields type to map(any)
  • Changes redacted_fields default to {}

why

  • Specifying log_destination_configs produces an error:
β”‚ Error: Invalid dynamic for_each value
β”‚ 
β”‚   on .terraform/modules/waf/main.tf line 15, in resource "aws_wafv2_web_acl_logging_configuration" "default":
β”‚   15:     for_each = var.redacted_fields
β”‚     β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚     β”‚ var.redacted_fields is null
β”‚ 
β”‚ Cannot use a null value in for_each.
  • Adding an empty redacted_fields map produces the following validation error:
β•·                                                                                                                                                                                                                                     
β”‚ Error: Invalid value for module argument                                                                                                                                                                                            
β”‚                                                                                                                                                                                                                                     
β”‚   on main.tf line 10, in module "waf":                                                                                                                                                                                              
β”‚   10:   redacted_fields = {}                                                                                                                                                                                                        
β”‚                                                                                                                                                                                                                                     
β”‚ The given value is not suitable for child module variable "redacted_fields"                                                                                                                                                         
β”‚ defined at .terraform/modules/waf/variables.tf:435,1-27: attributes                                                                                                                                                                 
β”‚ "method_enabled", "query_string_enabled", "single_header", and                                                                                                                                                                      
β”‚ "uri_path_enabled" are required.

because the variable type constraint is expecting a variable shaped like:

  redacted_fields = {
    method_enabled       = true
    uri_path_enabled     = false
    query_string_enabled = false
    single_header        = [] 
  }

While the code is expecting a map shaped like:

  redacted_fields = {
    foo = {
      method_enabled       = true
      uri_path_enabled     = false
      query_string_enabled = false
      single_header        = []
    }
  }
  • Adding a variable of the expected shape also produces errors like:
β•·                                                                                                                                                                                                                                     
β”‚ Error: Unsupported attribute                                                                                                                                                                                                        
β”‚                                                                                                                                                                                                                                     
β”‚   on .terraform/modules/waf/main.tf line 19, in resource "aws_wafv2_web_acl_logging_configuration" "default":                                                                                                                       
β”‚   19:         for_each = redacted_fields.value.method_enabled ? [1] : []                                                                                                                                                            
β”‚     β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€                                                                                                                                                                                                               
β”‚     β”‚ redacted_fields.value is false                                                                                                                                                                                                
β”‚                                                                                                                                                                                                                                     
β”‚ This value does not have any attributes. 
  • Changing to map(any) allows us to pass in an empty map when no redacted fields are needed, as well as pass in a map in the shape that the code is expecting

Beta release

10 Apr 07:09
c4c8e10
Compare
Choose a tag to compare
Beta release Pre-release
Pre-release

This initial implementation should be considered beta/pre-release. We think it is good, but the WAF rules are complicated and the Terraform provider is a very awkward fit for them, so it is likely there are problems lurking. Try it out and let us know.