Hi,
I am currently getting the below error message when attempting to use any resource/data source with the cloudflare provider.
Error: error listing Zone: error from makeRequest: HTTP status 400: content "{\"success\":false,\"errors\":[{\"code\":6003,\"message\":\"Invalid request headers\",\"error_chain\":[{\"code\":6103,\"message\":\"Invalid format for X-Auth-Key header\"}]}],\"messages\":[],\"result\":null}"
All resources
If this issue appears to affect multiple resources, it may be an issue with Terraform's core, so please mention this.
provider "cloudflare" {
email = "<EMAIL>"
api_key = "<API KEY>"
}
data "cloudflare_zones" "test" {
filter {
name = "test.domain"
status = "active"
paused = false
}
}
output "cloudflare-test" {
value = data.cloudflare_zones.test.id
}
https://gist.github.com/brucedvgw/49654423972b7cebec1244591bc3bd58
Provide a response output of the zone id of the requested domain
Error returned above.
Please list the steps required to reproduce the issue, for example:
terraform applyI have tried with configurations and credentials previously that previously worked and still receiving the same error.
I’m unable to reproduce this issue given the test case above. Can you confirm your using an API key and not an API token as the value?
Hi @jacobbednarz you are correct it was the wrong use of API Key, it should have been token
Thanks, I’ll add a new issue to add some validation to the API key and API
token to see if we can catch this earlier.
On Sun, 19 Apr 2020 at 13:29, brucedvgw notifications@github.com wrote:
Hi @jacobbednarz https://github.com/jacobbednarz you are correct it was
the wrong use of API Key, it should have been token—
You are receiving this because you were mentioned.Reply to this email directly, view it on GitHub
https://github.com/terraform-providers/terraform-provider-cloudflare/issues/657#issuecomment-616018478,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AACFEYXTBJCM4YF5SAZOVQLRNJVYNANCNFSM4MKWNKAA
.
Most helpful comment
Hi @jacobbednarz you are correct it was the wrong use of API Key, it should have been token