terraform-provider-bigip icon indicating copy to clipboard operation
terraform-provider-bigip copied to clipboard

Error while attaching WAF policy to virtual server

Open rsawant23 opened this issue 1 year ago • 1 comments
trafficstars

Environment

  • TMOS/Bigip Version: BIG-IP 17.1.1.1
  • Terraform Version: v1.0.3
  • Terraform bigip provider Version: 1.19.0

Summary

Applying a WAF policy to a virtual server is erroring out with the following:

Error: 01070734:3: Configuration error: The bot-defense-asm profile /Common/<waf_policy> was added to virtual server /Common/<virtual_server> but it does not match the asm-controlling policy. The bot-defense-asm profile is added to the virtual server automatically.

Steps To Reproduce

Steps to reproduce the behavior:

  1. resource "bigip_ltm_virtual_server" "http" { ... profiles = "/Common/<waf_policy>" ... }

  2. Terraform plan and apply

Expected Behavior

The waf policy is attached to the virtual server

Actual Behavior

I see that f5 also creates an ltm policy, do we have to add that to the virtual server to fix this?

rsawant23 avatar Apr 11 '24 14:04 rsawant23

Hi @rsawant23,

Can you share your TF file and the configuration created on the device?

Have you tried using https://registry.terraform.io/providers/F5Networks/bigip/latest/docs/resources/bigip_fast_http_app ?

pgouband avatar Apr 12 '24 07:04 pgouband