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

Add support for expr_options field #140

Open
tknodell-recurly opened this issue Nov 12, 2024 · 2 comments
Open

Add support for expr_options field #140

tknodell-recurly opened this issue Nov 12, 2024 · 2 comments
Labels
enhancement New feature or request upstream Work required on Terraform core or provider

Comments

@tknodell-recurly
Copy link

Google provider recently fixed bug that caused all rules to be recreated - hashicorp/terraform-provider-google-beta#8622

That seems to work fine. However this module still wants to recreate all rules to remove all expr_options which look to be added automatically

For example our plan shows

It will delete this rule

      - rule {
          - action      = "deny(403)" -> null
          - description = "Node JS attack" -> null
          - preview     = true -> null
          - priority    = 10 -> null

          - match {
              - expr {
                  - expression = "evaluatePreconfiguredWaf('nodejs-v33-stable', {'sensitivity': 4})" -> null
                }
              - expr_options {
                  - recaptcha_options {
                      - action_token_site_keys  = [] -> null
                      - session_token_site_keys = [] -> null
                    }
                }
            }
        }

And replace it with

      + rule {
          + action      = "deny(403)"
          + description = "Node JS attack"
          + preview     = true
          + priority    = 10

          + match {
              + expr {
                  + expression = "evaluatePreconfiguredWaf('nodejs-v33-stable', {'sensitivity': 4})"
                }
            }
        }

These are essentially the same
Can we add support for expr_options fields? Or ignore them so these dont get recreated every time
This only seems to affect the pre_configured_rules rule type

@piotr-pawlak-px
Copy link

Have the same issue. Just fixed the perma diff upgrading google-beta provider to v6.11.1 but have been caught by this expr_options. I my case affects "custom_rules".

@imrannayer
Copy link
Member

imrannayer commented Nov 13, 2024

@tknodell-recurly according to the documentation expr_options is an optional variable. Issue #18596 was created for it. Seems like they fixed preconfigured_waf_config issue but they havnt fixed recaptcha_options.
I will test and add expr_options to the module.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request upstream Work required on Terraform core or provider
Projects
None yet
Development

No branches or pull requests

3 participants