-
Notifications
You must be signed in to change notification settings - Fork 632
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Applying cloudflare_cloud_connector_rules resource deletes other existing ones #4821
Comments
Community NoteVoting for Prioritization
Volunteering to Work on This Issue
|
Thank you for reporting this issue! For maintainers to dig into issues it is required that all issues include the entirety of This issue has been marked with |
this is expected behaviour as all rules are managed centrally at the zone level. all |
That's quite limiting if intended behaviour, wouldn't you agree? What if you want to split your terraform state by your environments (e.g. live, staging) and have rules for different environments? What if you have some rules defined in terraform and some in the portal? It means this resource is different from other cloudflare terraform resources (which can be managed across different terraform states) and is a special case. |
it's not limiting if you understand the underlying implementation and why it exists. under the hood, it relies on the ruleset engine. see the overview at https://developers.cloudflare.com/ruleset-engine/ we don't offer a ruleset rule resource today as the current ERE architecture needs the surrounding context to make them useful. that may change in the future but no ETA or solid plans.
you should use different zones at a minimum for this, not the same zone - https://developers.cloudflare.com/terraform/advanced-topics/best-practices/#use-separate-environments
given this is the one resource, you don't want to do this and you'll be rubbing up against terraform's architecture doing so. see https://developers.cloudflare.com/terraform/advanced-topics/best-practices/#manage-terraform-resources-in-terraform |
Confirmation
Terraform and Cloudflare provider version
Terraform 1.10.3
Cloudflare provider 4.49.1
Affected resource(s)
cloudflare_cloud_connector_rules
Terraform configuration files
Link to debug output
n/a
Panic output
N/A
Expected output
Other existing cloud connector rules in Cloudflare (managed by terraform in separate repositories) shouldn't be deleted when this terraform is applied. It should add a new cloud connector rule with no impact on other existing rules.
Actual output
All other cloud connector rules not in the current state were deleted
Steps to reproduce
Additional factoids
No response
References
No response
The text was updated successfully, but these errors were encountered: