Permission denied to create zone

672 views Asked by At

I get this message after terraform apply:

Error: Error creating zone "example.com": HTTP status 400: Permission denied (1068)

Here's the content of both provider.tf and zone.tf

terraform {
  required_providers {
    cloudflare = {
      source = "terraform-providers/cloudflare"
    }
  }
  required_version = ">= 0.13"
}

provider "cloudflare" {
  version = "~> 2.0"
  account_id = var.cloudflare_account_id
  api_token = var.cloudflare_api_token
}

and

resource "cloudflare_zone" "example_zone" {
  zone = "example.com"
}

resource "cloudflare_zone_settings_override" "general" {
  zone_id = cloudflare_zone.example_zone.id
}

and these are the properties of the API token created at Cloudflare

enter image description here

0

There are 0 answers