Skip to content

Does flexibleengine_waf_rule_precise_protection support dedicated WAF ? #917

@MrLuje

Description

@MrLuje

Hi there,

I am trying to add some rules to an existing decidated WAF, I suspect the rules resources don't support a dedicated WAF so it may be more a feature request.

Terraform Version

Terraform v1.3.2 on linux_amd64

Affected Resource(s)

Please list the resources as a list, for example:

  • flexibleengine_waf_dedicated_policy
  • flexibleengine_waf_rule_precise_protection

If this issue appears to affect multiple resources, it may be an issue with Terraform's core, so please mention this.

Terraform Configuration Files

resource "flexibleengine_waf_dedicated_policy" "wildcard_domain" {
  name = "wildcard_domain"
}

resource "flexibleengine_waf_rule_precise_protection" "argocd-whitelist" {
  policy_id = flexibleengine_waf_dedicated_policy.wildcard_domain.id
  name      = "argocd.domain.com"
  priority  = 50

  conditions {
    field    = "header"
    subfield = "host"
    logic    = "contain"
    content  = "argocd.domain.com"
  }

  conditions {
    field   = "ip"
    logic   = "not_equal"
    content = "10.0.0.0"
  }
}

Expected Behavior

Precise protection rule should be created

Actual Behavior

It complains about the policy being missing
Also tried to import a manually created rule with the same issue

Steps to Reproduce

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

  1. The flexibleengine_waf_dedicated_policy already exists
  2. terraform apply

Debug Output

flexibleengine_waf_rule_precise_protection.argocd-whitelist: Creating...
╷
│ Error: error creating Flexibleengine WAF Precise Protection Rule: Resource not found: [POST https://waf.eu-west-0.prod-cloud-ocb.orange-business.com/v1/2d58c566d75b494cb87794dda5071654/waf/policy/4cd2cf5ebd344795a0c9fa22776d6055/custom], error message: {"error_msg": "Policy does not exist","error_code":"WAF.3001"}
│ 
│   with flexibleengine_waf_rule_precise_protection.argocd-whitelist,
│   on waf.tf line 24, in resource "flexibleengine_waf_rule_precise_protection" "argocd-whitelist":
│   24: resource "flexibleengine_waf_rule_precise_protection" "argocd-whitelist" {
│ 
╵

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions