-
Notifications
You must be signed in to change notification settings - Fork 756
Description
Confirmation
- This is a bug with an existing resource and is not a feature request or enhancement. Feature requests should be submitted with Cloudflare Support or your account team.
- I have searched the issue tracker and my issue isn't already found.
- I have replicated my issue using the latest version of the provider and it is still present.
Terraform and Cloudflare provider version
Terraform v1.13.4
on linux_amd64
- provider registry.terraform.io/cloudflare/cloudflare v5.11.0
Affected resource(s)
- cloudflare_zone_subscription
Terraform configuration files
resource "cloudflare_zone_subscription" "root_zone_subscription" {
zone_id = cloudflare_zone.root_zone.id
rate_plan = {
id = "PARTNERS_ENT"
}
}Link to debug output
N/A
Panic output
No response
Expected output
PARTNERS_ENT should be accepted as a valid rate_plan ID
Actual output
Error: Invalid Attribute Value Match
with cloudflare_zone_subscription.root_zone_subscription,
on main.tf line 9, in resource "cloudflare_zone_subscription" "root_zone_subscription":
9: resource "cloudflare_zone_subscription" "root_zone_subscription" {Attribute rate_plan.id value must be one of: ["free" "lite" "pro" "pro_plus"
"business" "enterprise" "partners_free" "partners_pro" "partners_business"
"partners_enterprise"], got: "PARTNERS_ENT"
Terraform Plan Failed!
Steps to reproduce
- Create cloudflare_zone_subscription with a rate_plan.id of PARTNERS_ENT
Additional factoids
I tried using the similarly named partners_enterprise rate_plan ID, but the provider gets a 404 when trying to assign it.
│ Error: failed to make http request
│
│ with cloudflare_zone_subscription.root_zone_subscription,
│ on main.tf line 9, in resource "cloudflare_zone_subscription" "root_zone_subscription":
│ 9: resource "cloudflare_zone_subscription" "root_zone_subscription" {
│
│ POST
│ "https://api.cloudflare.com/client/v4/zones/49..../subscription":
│ 404 Not Found {"success":false,"errors":[{"code":1298,"message":"Review the
│ rate plan ID and try again. Could not find the rate plan."}]}
If i check the available rate_plans for my zone i see PARTNERS_ENT but no partners_enterprise, and i am able to assign PARTNERS_ENT using the api directly.
I'm guessing the root cause here is that you use the API docs for code generation and they do not show PARTNERS_ENT either.
https://developers.cloudflare.com/api/resources/zones/subresources/subscriptions/methods/create/
https://developers.cloudflare.com/tenant/reference/subscriptions/
References
No response