cloudflare / terraform-provider-cloudflare

Cloudflare Terraform Provider
https://registry.terraform.io/providers/cloudflare/cloudflare
Mozilla Public License 2.0
779 stars 600 forks source link

cloudflare zone plan pro is not working #896

Closed rv-devops closed 3 years ago

rv-devops commented 3 years ago

Hi,

I am using cloudflare provider latest 2.14 When I use zone plan as pro it gives below error

I have used n below format via module: resource "cloudflare_zone" "zone" { zone = "example.com" plan = "pro" }

error: error setting plan pro for zone "XXXXXXX": error from makerequest: http status 500: content "{\"success\":false,\"errors\":[{\"code\":1000,\"message\":\"internal server error\"}]}\n"

Kindly resolve it.

jacobbednarz commented 3 years ago

these errors aren't something the terraform provider can address as it is the Cloudflare API returning the internal server error.

I'd recommend trying again later or gathering up the debug requests for the HTTP requests that were made and sending them into Cloudflare support for assistance.

accrisoftteam commented 3 years ago

If you have a standard free account, you have to approve the purchase of pro plans, so you can't use api/terraform to directly add a new pro zone.

Workaround on free account:

  1. Create the zone with plan = "free"
  2. Log in to Cloudflare Dashboard
  3. Change plan to Pro
  4. Approve the purchase
  5. Change the terraform to plan = "pro"
rv-devops commented 3 years ago

Thank you @accrisoftteam :) yes I am doing same but it's complicated as we have more than 5000 domains and at one time I am adding approx 100 sites behind cloudflare and to change pro manually on UI is time consuming.

dnguye91 commented 3 months ago

I am also having a problem with this statement: resource "cloudflare_zone" "new_zone" { account_id = var.account_id zone = var.zone_name plan = "enterprise" }

plan enterprise for zone "b2a1385938c345e0f20ac63e86b2d673": Authentication error (10000) ╷ │ Error: error setting plan enterprise for zone Authentication error (10000) │ │ with module.pacerapps_org.cloudflare_zone.new_zone, │ on modules\zone\main.tf line 12, in resource "cloudflare_zone" "new_zone": │ 12: resource "cloudflare_zone" "new_zone" {