Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to create CloudFlare Record: API Error: Zone does not exist. #1

Closed
hashibot opened this issue Jun 13, 2017 · 16 comments
Closed
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@hashibot
Copy link

This issue was originally opened by @JorritSalverda as hashicorp/terraform#2551. It was migrated here as part of the provider split. The original body of the issue is below.


In a CloudFlare multi-user organizational account no single user owns the data, but only has access rights to it, while it's owned by the organization. This causes zones seemingly not to exist when you try to add a record using one of the users and their api key.

The old api (https://www.cloudflare.com/docs/client-api.html) does not support the multi-user model, where the new one (https://api.cloudflare.com/) does.

I see the https://github.com/pearkes/cloudflare/ provider still uses the old api. Should I raise this issue with pearkes?

@hashibot hashibot added the kind/bug Categorizes issue or PR as related to a bug. label Jun 13, 2017
@hashibot
Copy link
Author

This comment was originally opened by @ziggythehamster as hashicorp/terraform#2551 (comment). It was migrated here as part of the provider split. The original comment is below.


I'm subscribing here as well - the upstream API used for CloudFlare (pearkes/cloudflare) prohibits Terraform from supporting the other APIs that CloudFlare exposes, like page rules (which would be the exact kind of thing that you'd want to manage with Terraform).

@hashibot
Copy link
Author

This comment was originally opened by @turneliusz as hashicorp/terraform#2551 (comment). It was migrated here as part of the provider split. The original comment is below.


Would be great to update

@hashibot
Copy link
Author

This comment was originally opened by @LoicAG as hashicorp/terraform#2551 (comment). It was migrated here as part of the provider split. The original comment is below.


This is an issue for us as well

@hashibot
Copy link
Author

This comment was originally opened by @stack72 as hashicorp/terraform#2551 (comment). It was migrated here as part of the provider split. The original comment is below.


Hi all

The cloudflare provider now uses the official cloudflare API - please can you tell me if this is still an error?

Thanks

Paul

@hashibot
Copy link
Author

This comment was originally opened by @craigedmunds as hashicorp/terraform#2551 (comment). It was migrated here as part of the provider split. The original comment is below.


This is still an issue in Terraform 0.7.0, I believe it's the same issue. I get:

  • cloudflare_record.cf_dns: Error finding zone ":domain:": ListZones command failed: 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}"

@hashibot
Copy link
Author

This comment was originally opened by @craigedmunds as hashicorp/terraform#2551 (comment). It was migrated here as part of the provider split. The original comment is below.


Hey @stack72 not sure if you've seen this - worth removing the "waiting-response" label?

@hashibot
Copy link
Author

This comment was originally opened by @pasali as hashicorp/terraform#2551 (comment). It was migrated here as part of the provider split. The original comment is below.


@stack72 i guess i am getting same error in Terraform v0.7.7
Error finding zone "example.com": Zone could not be found

@garrettgalow
Copy link
Contributor

@patryk either this is fixed generally or works when one provides the org_id flag in the provider config. either way I think this is safe to close given a year with no update and others are hitting any issues now.

@patryk
Copy link
Contributor

patryk commented Aug 14, 2018

Yeah, I believe it should not happen anymore, but if it does, better to have fresh report opened. Closing as stale.

@patryk patryk closed this as completed Aug 14, 2018
@BouchaaraAdil
Copy link

the error is still persisting using the latest terraform version v0.11.8

@garrettgalow
Copy link
Contributor

Can you please provide more details? Also please ensure you are using the latest version of our provider: v1.4.0

@CaseyLabs
Copy link

CaseyLabs commented Oct 26, 2018

It appears that I am running into this issue as well.

Terraform v0.11.10

  • provider.archive v1.1.0
  • provider.aws v1.40.0
  • provider.cloudflare v1.7.0
  • provider.template v1.0.0

cloudflare.tf

provider "cloudflare" {
  email = "[email protected]"
  token = "<my-cloudflare-global-key>"
}

resource "cloudflare_record" "test" {
  name    = "test.mydomain.com"
  domain  = "<mydomain-zone-id>"
  type    = "TXT"
  ttl     = "600"
  value   = "hello"
}

Results:

cloudflare_record.test: 1 error(s) occurred:

* cloudflare_record.test: Error finding zone "<mydomain-zone-id>": Zone could not be found

Thoughts?

@patryk
Copy link
Contributor

patryk commented Oct 26, 2018

You need to use zone name, not ID. We will soon do a refactor that will allow using zone IDs directly.

@CaseyLabs
Copy link

Yep, that did it... changing it to my-domain.com instead of the Zone ID worked. Thanks!

@JasonM-mwh
Copy link

This error seems to now once again exist in the cloudflare 1.9 provider. When I've attempted an import, I get: "Zone could not be found"

I've downgraded to the 1.8 version, and the import works just fine.

@ghost ghost removed the lifecycle/stale label Nov 21, 2018
@jacobbednarz
Copy link
Member

@JasonM-mwh can you please open a new issue using the issue template provided and we can take a look? thanks!

jacobbednarz pushed a commit that referenced this issue May 25, 2022
stainless-app bot pushed a commit that referenced this issue Jun 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

No branches or pull requests

7 participants