Describe what happened
When upgrading from pulumi-cloudflare v5 to v6, the Plan field was removed from cloudflare.Zone. The recommended approach is to use a separate cloudflare.ZoneSubscription resource. However, creating or importing a ZoneSubscription for zones on the free plan fails with a 404 error from the Cloudflare API.
This happens despite the Pulumi registry docs listing "free" as a valid RatePlan.Id value and showing it in the example usage.
error: [ERROR] GET "https://api.cloudflare.com/client/v4/zones/<zone_id>/subscription":
404 Not Found
{
"success": false,
"errors": [{
"code": 1207,
"message": "Add a core subscription first and try again. The zone does not have an active core subscription."
}]
}
Meanwhile, paid zones (e.g., Pro plan) import successfully using the same pattern. This means free-plan zones cannot have their subscription managed at all — the only workaround is to conditionally skip creating ZoneSubscription for free zones.
Sample program
package main
import (
"github.com/pulumi/pulumi-cloudflare/sdk/v6/go/cloudflare"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
zone, err := cloudflare.NewZone(ctx, "my-zone", &cloudflare.ZoneArgs{
AccountId: pulumi.String("your-account-id"),
Zone: pulumi.String("example.com"),
})
if err != nil {
return err
}
_, err = cloudflare.NewZoneSubscription(ctx, "my-zone-subscription", &cloudflare.ZoneSubscriptionArgs{
ZoneId: zone.ID(),
RatePlan: &cloudflare.ZoneSubscriptionRatePlanArgs{
Id: pulumi.String("free"),
},
}, pulumi.Import(zone.ID()))
if err != nil {
return err
}
return nil
})
}
Log output
Previewing update:
error: [ERROR] GET "https://api.cloudflare.com/client/v4/zones/<zone_id>/subscription":
404 Not Found {"success":false,"errors":[{"code":1207,"message":"Add a core subscription first and try again. The zone does not have an active core subscription."}]}
: failed to make http request
error: Preview failed: failed to make http request
Affected Resource(s)
cloudflare.ZoneSubscription (cloudflare:index/zoneSubscription:ZoneSubscription)
Output of pulumi about
CLI: 3.226.0
Go: go1.25.6
Host: darwin, arm64
Plugins:
cloudflare 6.14.0
Additional context
The discrepancy:
Direct API verification confirms free zones do not have a subscription object:
curl -s -H "Authorization: Bearer $CF_TOKEN" \
"https://api.cloudflare.com/client/v4/zones/<free_zone_id>/subscription"
# Returns 404 with code 1207
This likely originates from the upstream Terraform provider (cloudflare/terraform-provider-cloudflare) which auto-generates the schema from the Cloudflare OpenAPI spec — the spec lists "free" as a valid enum value, but the API doesn't actually support it.
Related upstream issues:
Contributing
No response
Describe what happened
When upgrading from
pulumi-cloudflarev5 to v6, thePlanfield was removed fromcloudflare.Zone. The recommended approach is to use a separatecloudflare.ZoneSubscriptionresource. However, creating or importing aZoneSubscriptionfor zones on the free plan fails with a 404 error from the Cloudflare API.This happens despite the Pulumi registry docs listing
"free"as a validRatePlan.Idvalue and showing it in the example usage.Meanwhile, paid zones (e.g., Pro plan) import successfully using the same pattern. This means free-plan zones cannot have their subscription managed at all — the only workaround is to conditionally skip creating
ZoneSubscriptionfor free zones.Sample program
Log output
Affected Resource(s)
cloudflare.ZoneSubscription(cloudflare:index/zoneSubscription:ZoneSubscription)Output of
pulumi aboutAdditional context
The discrepancy:
"free"RatePlan.Id, shown in examplerate_plan.id, shown in exampleGET /zones/{zone_id}/subscriptionreturns 404 for free zonesDirect API verification confirms free zones do not have a subscription object:
This likely originates from the upstream Terraform provider (cloudflare/terraform-provider-cloudflare) which auto-generates the schema from the Cloudflare OpenAPI spec — the spec lists
"free"as a valid enum value, but the API doesn't actually support it.Related upstream issues:
cloudflare_zone_subscription: uses wrong ID field in Read/Update cloudflare/terraform-provider-cloudflare#5670Contributing
No response