Confirmation
Terraform and Cloudflare provider version
3.3.0
Affected resource(s)
cloudflare_zone
Terraform configuration files
resource "cloudflare_zone" "this" {
zone = var.zone_name
paused = var.paused
jump_start = var.jump_start
plan = var.plan // = enterprise
type = var.type
}
Debug output
Error: error creating zone "...........com": HTTP status 400: Permission denied (1068)
with module.zone_base_config.cloudflare_zone.this[0],
on .terraform/modules/zone_base_config/zone.tf line 1, in resource "cloudflare_zone" "this":
1: resource "cloudflare_zone" "this" {
time=2022-01-13T17:32:17Z level=error msg=1 error occurred:
Panic output
No response
Expected output
zone created
Actual output
Error: error creating zone "...............com": HTTP status 400: Permission denied (1068)
with module.zone_base_config.cloudflare_zone.this[0],
on .terraform/modules/zone_base_config/zone.tf line 1, in resource "cloudflare_zone" "this":
1: resource "cloudflare_zone" "this" {
time=2022-01-13T17:32:17Z level=error msg=1 error occurred:
Steps to reproduce
- Create API Token with the following permissions:
Account-level - Billing:Edit, Account Settings:Edit
All zones - Zone WAF:Edit, Zone Settings:Edit, Zone:Edit, SSL and Certificates:Edit, Logs:Edit, DNS:Edit, Analytics:Read
- Use token in Terraform provider and try to create a zone using cloudflare_zone resource.
Additional factoids
According to #1102 and @jacobbednarz, API token should have worked.
As per Cloudflare, API Keys are considered legacy and not recommended to use, therefore we need to use API Tokens instead.
References
#1102
#1101
Confirmation
Terraform and Cloudflare provider version
3.3.0
Affected resource(s)
cloudflare_zone
Terraform configuration files
Debug output
Error: error creating zone "...........com": HTTP status 400: Permission denied (1068)
with module.zone_base_config.cloudflare_zone.this[0],
on .terraform/modules/zone_base_config/zone.tf line 1, in resource "cloudflare_zone" "this":
1: resource "cloudflare_zone" "this" {
time=2022-01-13T17:32:17Z level=error msg=1 error occurred:
Panic output
No response
Expected output
zone created
Actual output
Error: error creating zone "...............com": HTTP status 400: Permission denied (1068)
with module.zone_base_config.cloudflare_zone.this[0],
on .terraform/modules/zone_base_config/zone.tf line 1, in resource "cloudflare_zone" "this":
1: resource "cloudflare_zone" "this" {
time=2022-01-13T17:32:17Z level=error msg=1 error occurred:
Steps to reproduce
Account-level - Billing:Edit, Account Settings:Edit
All zones - Zone WAF:Edit, Zone Settings:Edit, Zone:Edit, SSL and Certificates:Edit, Logs:Edit, DNS:Edit, Analytics:Read
Additional factoids
According to #1102 and @jacobbednarz, API token should have worked.
As per Cloudflare, API Keys are considered legacy and not recommended to use, therefore we need to use API Tokens instead.
References
#1102
#1101