403 Authentication error when creating DNS records
When creating DNS records using Terraform, the API returns the following error:
Error: failed to create DNS record: HTTP status 403: Authentication error (10000)
This is caused by an error in your code syntax, when you are not using index [0] for the zones. Find an example below and a more detailed thread on GitHub ↗.
Instead of this:
zone_id = data.cloudflare_zones.example_com.idUse this:
zone_id = data.cloudflare_zones.example_com.zones[0].id`