Cloudflare_pages_project terraform resource doesn't deploy a page after creation

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.

After clicking the deploy button, the page becomes available. I am looking for a way to avoid to manually click that button and manage everything purely with Terraform. For the context, the src code of the page is hosted in GitHub, and GitHub actions builds the static HTML files and places them in a branch within the same repository. I want Cloudflare to only use the static HTML to deploy the Page and not to build the src itself.

This is expected. The terraform provider only creates the project and there would need to be an extra API call to create a new deployment. You should make a feature request at the provider GitHub - cloudflare/terraform-provider-cloudflare: Cloudflare Terraform Provider for this

1 Like

Understood, thank you! I opened a feature request here:

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.