Pages Project
If you are using a
source
block configuration, you must first have a connected GitHub or GitLab account connected to Cloudflare. See the Getting Started with Pages documentation on how to link your accounts.
Example Usage
resources:
examplePagesProject:
type: cloudflare:PagesProject
name: example_pages_project
properties:
accountId: 023e105f4ecef8ad9ca31a8372d0c353
buildConfig:
build_caching: true
build_command: npm run build
destination_dir: build
root_dir: /
web_analytics_tag: cee1c73f6e4743d0b5e6bb1a0bcaabcc
web_analytics_token: 021e1057c18547eca7b79f2516f06o7x
deploymentConfigs:
preview:
aiBindings:
AI_BINDING:
projectId: some-project-id
analyticsEngineDatasets:
ANALYTICS_ENGINE_BINDING:
dataset: api_analytics
browsers:
BROWSER: {}
compatibilityDate: 2022-01-01
compatibilityFlags:
- url_standard
d1Databases:
D1_BINDING:
id: 445e2955-951a-43f8-a35b-a4d0c8138f63
durableObjectNamespaces:
DO_BINDING:
namespaceId: 5eb63bbbe01eeed093cb22bb8f5acdc3
envVars:
foo:
type: plain_text
value: hello world
hyperdriveBindings:
HYPERDRIVE:
id: a76a99bc342644deb02c38d66082262a
kvNamespaces:
KV_BINDING:
namespaceId: 5eb63bbbe01eeed093cb22bb8f5acdc3
mtlsCertificates:
MTLS:
certificateId: d7cdd17c-916f-4cb7-aabe-585eb382ec4e
placement:
mode: smart
queueProducers:
QUEUE_PRODUCER_BINDING:
name: some-queue
r2Buckets:
R2_BINDING:
jurisdiction: eu
name: some-bucket
services:
SERVICE_BINDING:
entrypoint: MyHandler
environment: production
service: example-worker
vectorizeBindings:
VECTORIZE:
indexName: my_index
production:
aiBindings:
AI_BINDING:
projectId: some-project-id
analyticsEngineDatasets:
ANALYTICS_ENGINE_BINDING:
dataset: api_analytics
browsers:
BROWSER: {}
compatibilityDate: 2022-01-01
compatibilityFlags:
- url_standard
d1Databases:
D1_BINDING:
id: 445e2955-951a-43f8-a35b-a4d0c8138f63
durableObjectNamespaces:
DO_BINDING:
namespaceId: 5eb63bbbe01eeed093cb22bb8f5acdc3
envVars:
foo:
type: plain_text
value: hello world
hyperdriveBindings:
HYPERDRIVE:
id: a76a99bc342644deb02c38d66082262a
kvNamespaces:
KV_BINDING:
namespaceId: 5eb63bbbe01eeed093cb22bb8f5acdc3
mtlsCertificates:
MTLS:
certificateId: d7cdd17c-916f-4cb7-aabe-585eb382ec4e
placement:
mode: smart
queueProducers:
QUEUE_PRODUCER_BINDING:
name: some-queue
r2Buckets:
R2_BINDING:
jurisdiction: eu
name: some-bucket
services:
SERVICE_BINDING:
entrypoint: MyHandler
environment: production
service: example-worker
vectorizeBindings:
VECTORIZE:
indexName: my_index
name: NextJS Blog
productionBranch: main
Content copied to clipboard
Import
!> It is not possible to import a pages project with secret environment variables. If you have a secret environment variable, you must remove it from your project before importing it.
$ pulumi import cloudflare:index/pagesProject:PagesProject example '<account_id>/<project_name>'
Content copied to clipboard
Properties
Link copied to clipboard
Configs for the project build process.
Link copied to clipboard
Most recent deployment to the repo.
Link copied to clipboard
Configs for deployments in a project.
Link copied to clipboard
Most recent deployment to the repo.
Link copied to clipboard
Production branch of the project. Used to identify production deployments.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard