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

oci_waas_protection_rule issue

Open saracm93 opened this issue 1 year ago • 1 comments

Hi all, I'm trying to update the multiple protection roles at the same time on one edge policy (WAF). The issue here is that after the first policy is applied the lifecycle state will be changed and then I got the next error: │ ErrorMessage - The lifecycleState is 'UPDATING'. It must be 'ACTIVE'.

Can this be fixed or should I use a different approach?

Terraform Version and Provider Version

Terraform v1.2.4 on linux_amd64 provider oci hashicorp/oci 4.83.0

Affected Resource(s)

oci_waas_protection_rule

Terraform code

variable detect_roles { type = set(string) default = [932000033, 941000033, 930000033] } variable block_roles { type = set(string) default = [944130, 932120, 932160] }

resource "oci_waas_protection_rule" "detect_protection_rule" { for_each = var.detect_roles waas_policy_id = oci_waas_waas_policy.WAF_DEV[0].id key = each.value action = "DETECT" }

resource "oci_waas_protection_rule" "block_protection_rule" { for_each = var.block_roles waas_policy_id = oci_waas_waas_policy.WAF_DEV[0].id key = each.value action = "BLOCK" }

saracm93 avatar Jul 13 '22 14:07 saracm93

Have exactly the same issue. I solved this by pushing security rules in json through the OCI CLI, but this is inconvenient

visanzhar avatar Sep 13 '22 11:09 visanzhar

Have exactly the same issue.

Error: circuit breaker is open, so this request was not sent to the Waas service.
ErrorCode - 409 - IncorrectState
ErrorMessage - The lifecycleState is 'UPDATING'. It must be 'ACTIVE'.

wuilber002 avatar Oct 22 '22 02:10 wuilber002

Thank you for reporting the issue. We have raised an internal ticket to track this. Our service engineers will get back to you.

ravinitp avatar Apr 11 '23 13:04 ravinitp

There is no way to update multiple protection rules via terraform. As a workaround you may use CLI/API or SDK to update multiple protection rules.

kumpaitis avatar Apr 26 '23 08:04 kumpaitis