You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
❯ terraform plan
Error: cloudflare_page_rule.some_rule: expected status to be one of [active paused], got deactivated
Expected Behavior
Terraform should not error on valid status.
Actual Behavior
Terraform plan errors on status that is not active or paused. The real problem here is that while paused will work for terraform plan, it is not valid for the Cloudflare API.
The valid page rules status options for the Cloudflare api are: active and disabled. This Cloudflare Terraform provider erroneously requires the status to be one of active or paused.
I'm sorry you're having problems, but the correct value is disabled. We've already fixed it in #84, waiting now for Terraform to release new version. In the meantime you may use a cloned master branch or import a patch.
Terraform Version
Affected Resource(s)
Terraform Configuration Files
Debug Output
Expected Behavior
Terraform should not error on valid status.
Actual Behavior
Terraform plan errors on status that is not
active
orpaused
. The real problem here is that whilepaused
will work forterraform plan
, it is not valid for the Cloudflare API.The valid page rules status options for the Cloudflare api are:
active
anddisabled
. This Cloudflare Terraform provider erroneously requires the status to be one ofactive
orpaused
.relevant docs: https://api.cloudflare.com/#page-rules-for-a-zone-create-page-rule
Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
terraform plan
withdeactivated
as a status valuealternatively to trigger api error when applying
terraform plan
withpaused
as a status valueterraform apply
References
Here is the code that needs a patch
https://github.com/terraform-providers/terraform-provider-cloudflare/blob/cedda3010a6ba474a3b2287cd932cf27a8273880/cloudflare/resource_cloudflare_page_rule.go#L288
The text was updated successfully, but these errors were encountered: