Account API Token vs User API Token causing 500s from CloudFlare API

I'm a bit unsure if I've bumped into a bug with the CloudFlare API when using the Account API Token beta, or if I'm just using something incorrectly. I'm looking at switching from using User API Tokens to Account API Tokens for provisioning our infrastructure, but switching to this new token has resulted in 500 responses from the CloudFlare API when I run our Terraform deployment. We need to modify DNS, manage CloudFlare Pages, and manage SSL/TLS with the token. I have set up a token like this:
MY_ACCOUNT's Account - Cloudflare Pages:Edit
MY_ZONE - SSL and Certificates:Edit, DNS:Edit
MY_ACCOUNT's Account - Cloudflare Pages:Edit
MY_ZONE - SSL and Certificates:Edit, DNS:Edit
Then we have resources like this in our Terraform script:
resource "cloudflare_origin_ca_certificate" "MY_RESOURCE" {
csr = MY_CSR
hostnames = ["MY_HOSTNAME"]
request_type = "origin-rsa"
requested_validity = 365
min_days_for_renewal = 90
}
resource "cloudflare_origin_ca_certificate" "MY_RESOURCE" {
csr = MY_CSR
hostnames = ["MY_HOSTNAME"]
request_type = "origin-rsa"
requested_validity = 365
min_days_for_renewal = 90
}
Whenever I try to apply this it fails to fetch the state of these origin CA certificates with an error like this:
error finding OriginCACertificate "ID HERE": received internal server error response (HTTP 500), please try again later
error finding OriginCACertificate "ID HERE": received internal server error response (HTTP 500), please try again later
Looking at the actual API response it is just this:
{
"success": false,
"errors": [
{
"code": 500,
"message": "unhandled server error"
}
],
"messages": [],
"result": null
}
{
"success": false,
"errors": [
{
"code": 500,
"message": "unhandled server error"
}
],
"messages": [],
"result": null
}
This all works perfectly fine with the User API Token, so I'm just trying to understand if I've misconfigured something here, or if there's a bug here/something that isn't supported yet by the Account API Token beta. Thanks!
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server