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

[ruleset] Add managed_challenge action #1436

Closed
vences opened this issue Feb 9, 2022 · 0 comments · Fixed by #1442
Closed

[ruleset] Add managed_challenge action #1436

vences opened this issue Feb 9, 2022 · 0 comments · Fixed by #1442
Labels
kind/enhancement Categorizes issue or PR as related to improving an existing feature. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one.

Comments

@vences
Copy link
Contributor

vences commented Feb 9, 2022

Current Terraform and Cloudflare provider version

➜ terraform -v
Terraform v1.1.4
on darwin_amd64
+ provider registry.terraform.io/cloudflare/cloudflare v3.8.0

Your version of Terraform is out of date! The latest version
is 1.1.5. You can update by downloading from https://www.terraform.io/downloads.html

Description

Managed challenge has been added as an action recently. The Feature Request is to support managed challenge in Ruleset. Another FR has been created to support it on the Rate Limiting -> #1431
The documentation related to that action is here

Use cases

Support an action of managed_challenge in ruleset.

Potential Terraform configuration

resource "cloudflare_ruleset" "zone_level_managed_waf" {
  zone_id     = var.cloudflare_zone_id
  name        = "managed WAF"
  description = "managed WAF ruleset description"
  kind        = "zone"
  phase       = "http_request_firewall_managed"

  rules {
    action = "execute"
    action_parameters {
      id = "efb7b8c949ac4650a09736fc376e9aee"
      overrides {
        action = "managed_challenge"
      }
    }
    expression = "true"
    description = "Execute default rules in Cloudflare Managed Ruleset in managed challenge mode on my zone-level phase entry point ruleset"
    enabled = true
  }
}

Current output

╷
│ Error: expected rules.0.action_parameters.0.overrides.0.action to be one of [block challenge ddos_dynamic execute force_connection_close js_challenge log rewrite score skip], got managed_challenge
│ 
│   with cloudflare_ruleset.zone_level_managed_waf,
│   on rulesets_zone.tf line 48, in resource "cloudflare_ruleset" "zone_level_managed_waf":48:         action = "managed_challenge"
│ 
╵

References

@vences vences added kind/enhancement Categorizes issue or PR as related to improving an existing feature. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Feb 9, 2022
vences added a commit to vences/cloudflare-go that referenced this issue Feb 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement Categorizes issue or PR as related to improving an existing feature. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant