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

Error: error creating cloudflare pages project #4729

Closed
3 tasks done
hkford opened this issue Dec 7, 2024 · 7 comments
Closed
3 tasks done

Error: error creating cloudflare pages project #4729

hkford opened this issue Dec 7, 2024 · 7 comments
Labels
kind/bug Categorizes issue or PR as related to a bug. service/pages Categorizes issue or PR as related to the Pages service. triage/accepted Indicates an issue or PR is ready to be actively worked on. triage/debug-log-attached Indicates an issue or PR has a complete Terraform debug log. workflow/synced

Comments

@hkford
Copy link

hkford commented Dec 7, 2024

Confirmation

  • This is a bug with an existing resource and is not a feature request or enhancement. Feature requests should be submitted with Cloudflare Support or your account team.
  • I have searched the issue tracker and my issue isn't already found.
  • I have replicated my issue using the latest version of the provider and it is still present.

Terraform and Cloudflare provider version

Terraform v1.10.0
on darwin_arm64

  • provider registry.terraform.io/cloudflare/cloudflare v4.47.0

Your version of Terraform is out of date! The latest version
is 1.10.1. You can update by downloading from https://www.terraform.io/downloads.html

Affected resource(s)

cloudflare_pages_project

Terraform configuration files

resource "cloudflare_pages_project" "from_terraform" {
  account_id        = var.account_id
  name              = "from-terraform"
  production_branch = "main"
  build_config {
    build_caching       = false
    build_command       = "hugo build"
    destination_dir     = "public"
  }
  deployment_configs {
    preview {
      always_use_latest_compatibility_date = false
      compatibility_date                   = "2024-12-06"
      compatibility_flags                  = []
      d1_databases                         = {}
      durable_object_namespaces            = {}
      environment_variables = {
        HUGO_VERSION = "0.139.0"
      }
      fail_open     = true
      kv_namespaces = {}
      r2_buckets    = {}
      secrets       = null # sensitive
      usage_model   = "standard"
    }
    production {
      always_use_latest_compatibility_date = false
      compatibility_date                   = "2024-12-06"
      compatibility_flags                  = []
      d1_databases                         = {}
      durable_object_namespaces            = {}
      environment_variables = {
        HUGO_VERSION = "0.139.0"
      }
      fail_open     = true
      kv_namespaces = {}
      r2_buckets    = {}
      secrets       = null # sensitive
      usage_model   = "standard"
    }
  }
  source {
    type = "github"
    config {
      deployments_enabled           = true
      owner                         = "hkford"
      pr_comments_enabled           = true
      preview_branch_excludes       = []
      preview_branch_includes       = ["*"]
      preview_deployment_setting    = "all"
      production_branch             = "main"
      production_deployment_enabled = true
      repo_name                     = "my-repo"
    }
  }
}

Link to debug output

https://gist.github.com/hkford/ac852955a3abef09030faf38639266ef

Panic output

No response

Expected output

Successfully create Cloudflare Pages project

Actual output

Could not create Cloudflare Pages project

Steps to reproduce

terraform apply

Additional factoids

I created a Cloudflare Pages project from console and imported it into the Terraform configuration file using terraform import.

References

No response

@hkford hkford added kind/bug Categorizes issue or PR as related to a bug. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Dec 7, 2024
Copy link

github-actions bot commented Dec 7, 2024

Community Note

Voting for Prioritization

  • Please vote on this issue by adding a 👍 reaction to the original post to help the community and maintainers prioritize this request.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

Volunteering to Work on This Issue

  • If you are interested in working on this issue, please leave a comment.
  • If this would be your first contribution, please review the contribution guide.

Copy link

github-actions bot commented Dec 7, 2024

Terraform debug log detected ✅

1 similar comment
Copy link

github-actions bot commented Dec 7, 2024

Terraform debug log detected ✅

@github-actions github-actions bot added triage/needs-information Indicates an issue needs more information in order to work on it. triage/debug-log-attached Indicates an issue or PR has a complete Terraform debug log. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. triage/needs-information Indicates an issue needs more information in order to work on it. labels Dec 7, 2024
@jacobbednarz jacobbednarz added triage/accepted Indicates an issue or PR is ready to be actively worked on. service/pages Categorizes issue or PR as related to the Pages service. labels Dec 9, 2024
@taylorlee
Copy link

@hkford fyi there may be an issue creating projects with Account Owned Tokens. While we fix that, in the meantime you may be able to create your project using API Token Auth.

@hkford
Copy link
Author

hkford commented Dec 17, 2024

I'm using API Token and encountered this issue.

@taylorlee
Copy link

taylorlee commented Dec 19, 2024

@hkford there was an issue with creating Pages projects using API Tokens that are owned by an account (as opposed to owned by a User). That issue has been fixed, so please let us know if you encounter any other issues!

@hkford
Copy link
Author

hkford commented Dec 20, 2024

I confirmed I could successfully create Pages projects using API Tokens. Close the issue.

@hkford hkford closed this as completed Dec 20, 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. service/pages Categorizes issue or PR as related to the Pages service. triage/accepted Indicates an issue or PR is ready to be actively worked on. triage/debug-log-attached Indicates an issue or PR has a complete Terraform debug log. workflow/synced
Projects
None yet
Development

No branches or pull requests

3 participants