-
Notifications
You must be signed in to change notification settings - Fork 630
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
Add support to retrieve ruleset ids to successfully import custom cloudflare_ruleset #2804
Comments
Community NoteVoting for Prioritization
Volunteering to Work on This Issue
|
have you tried using the that has worked for me in the past to get any rule type. |
@jacobbednarz Thanks for the suggestion. I created a few different data sources for various custom rules we have. They all return the same ruleset id and when I try to run a zone import for our cloudflare_ruleset.videos resource for example I get the following error:
After further digging maybe the issue lies in the fact that I'm trying to import custom "rules" rather than custom "rulesets" |
you don't import rules; you import the entire ruleset and the rules are a part of that. |
closing this off as a misunderstanding of how the |
Current Terraform and Cloudflare provider version
Terraform v1.4.6
Cloudflare v4.15.0
Description
The following curl request only returns kind: managed/zone rulesets and never returns custom rulesets so it's impossible to get the ruleset id in order to import custom cloudflare_ruleset
curl --request GET
--url https://api.cloudflare.com/client/v4/accounts/zone_id/rulesets
--header 'Authorization: Bearer api_token'
--header 'Content-Type: application/json'
Use cases
Unless we are able to obtain ruleset ids for kind: custom cloudflare_ruleset we are unable to import existing custom rulesets into terraform.
Potential Terraform configuration
References
https://github.com/cloudflare/terraform-provider-cloudflare/pull/2054/files this solves import for cloudflare_ruleset however it's currently not possible to retrieve ruleset ids for custom rulesets
The text was updated successfully, but these errors were encountered: