terraform-provider-oci
terraform-provider-oci copied to clipboard
oci_waas_protection_rule issue
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" }
Have exactly the same issue. I solved this by pushing security rules in json through the OCI CLI, but this is inconvenient
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'.
Thank you for reporting the issue. We have raised an internal ticket to track this. Our service engineers will get back to you.
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.