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

Add import feature to cloudflare_pages_domain #1958

Closed
snuggie12 opened this issue Oct 11, 2022 · 3 comments · Fixed by #1973
Closed

Add import feature to cloudflare_pages_domain #1958

snuggie12 opened this issue Oct 11, 2022 · 3 comments · Fixed by #1973
Labels
kind/enhancement Categorizes issue or PR as related to improving an existing feature. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one.
Milestone

Comments

@snuggie12
Copy link

Current Terraform and Cloudflare provider version

0.13.5 and 3.25.0

Description

I'm getting similar errors as #1946 and was hoping I could temporarily fix it by importing the domain. I don't see a way to import in the documentation or in the code when comparing to something like cloudflare_pages_project.

ID is not easily found without opening the dev console in a browser. Perhaps the name of the domain would work best in combination with account ID? Perhaps project too?

Also, this seems way too small to file a bug report, but

return diag.FromErr(fmt.Errorf("error creating domain for project %q: %w", accountID, err))
is incorrect and says it will output a project but outputs the account ID.

Use cases

See above. Importing is a common feature for resources.

Potential Terraform configuration

n/a

References

No response

@snuggie12 snuggie12 added kind/enhancement Categorizes issue or PR as related to improving an existing feature. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Oct 11, 2022
@rafaellucio
Copy link

I have a similar problem when try use this:

# domain my-test-terraform.com

resource "cloudflare_pages_domain" "prod" {
  account_id   = var.account_id
  project_name = var.project_name
  domain       = var.domain
}

Output

Error: error creating domain for project "5df477d4f9a8cf72185ef8f44fd1e144": Domain is unavailable (8000018)
with cloudflare_pages_domain.prod
on cloudflare.tf line 65, in resource "cloudflare_pages_domain" "prod":
resource "cloudflare_pages_domain" "prod" {

In these case I need use an import for that my terraform run correctly

@snuggie12
Copy link
Author

I have a similar problem when try use this:

# domain my-test-terraform.com

resource "cloudflare_pages_domain" "prod" {
  account_id   = var.account_id
  project_name = var.project_name
  domain       = var.domain
}

Output

Error: error creating domain for project "5df477d4f9a8cf72185ef8f44fd1e144": Domain is unavailable (8000018)
with cloudflare_pages_domain.prod
on cloudflare.tf line 65, in resource "cloudflare_pages_domain" "prod":
resource "cloudflare_pages_domain" "prod" {

In these case I need use an import for that my terraform run correctly

@rafaellucio have you by chance filed a support ticket yet? I've yet to look into it more, but I get an 8000000 error in the UI adding or deleting custom domains but it still succeeds. Very similar to TF and the 80*18 error. I saw someone ask about this a month ago in the CF community forums but this repo is saying talk to CF and CF is saying talk to this repo so going to try the official route if someone else hasn't.

WalshyDev added a commit to WalshyDev/terraform-provider-cloudflare that referenced this issue Oct 15, 2022
WalshyDev added a commit to WalshyDev/terraform-provider-cloudflare that referenced this issue Oct 18, 2022
@github-actions github-actions bot added this to the v3.26.0 milestone Oct 18, 2022
@github-actions
Copy link
Contributor

This functionality has been released in v3.26.0 of the Terraform Cloudflare Provider.

Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement Categorizes issue or PR as related to improving an existing feature. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants