Closed hndoss closed 7 months ago
Voting for Prioritization
Volunteering to Work on This Issue
Just want to post a workaround I did in my project
resource "null_resource" "deploy" {
triggers = {
always_run = "${timestamp()}"
}
provisioner "local-exec" {
command = "cd ../app && envsubst < wrangler.template.toml > wrangler.toml && yarn build && yarn deploy --project-name $PROJECT_NAME"
environment = {
PROJECT_NAME = local.PROJECT_NAME
CLOUDFLARE_ACCOUNT_ID = var.cloudflare_account_id
PROJECT_KV_ID = cloudflare_workers_kv_namespace.app-kv-ns.id
PROJECT_D1_NAME = local.D1_NAME
PROJECT_D1_ID = cloudflare_d1_database.app-cms-db.id
PROJECT_R2_NAME = local.R2_NAME
}
}
}
This issue has been closed as we are now tracking this internally with service teams directly. If you would like an update or to be notified when/if the product ships with this change, please reach out to Cloudflare Support or your account team who can watch the internal feature request for you.
Current Terraform and Cloudflare provider version
Terraform v1.7.2 Cloudflare provider version 4.23.0
Description
After creating a Page project with the cloudflare_pages_project Terraform resource, the page can’t be accessed due to the following message "This project has not been deployed" when the static HTML is hosted in a Git repository. Can the provider also manage the first deployment?
Use cases
Potential Terraform configuration
I think it should be the default behavior. I mean, after creating a Page project in Cloudflare, is understandable that the user is expecting a deployed project instead of having to click a deploy button in the Cloudflare's console.
References
https://community.cloudflare.com/t/cloudflare-pages-project-terraform-resource-doesnt-deploy-a-page-after-creation/609016?u=hndoss