Docs
Reference

Cloudflare Pages

Move environment variables to and from a Pages project.

Move environment variables to and from a Pages project.

The connection

WhatThis provider
VendorCloudflare
Keycloudflare-pages
Availabilityavailable. You can connect it today.
Credential penv holdscloudflare-token
Values read backyes
Activationon-next-deploy

What it moves

DirectionWhat it does
importReads names and values out of the store into penv.
exportWrites names and values from penv into the store.

When a written value goes live

on-next-deploy. A new value waits there and arrives with your next deploy.

What happens to a name that exists

DirectionPolicies you can pick
importskip_existing, new_version, fail
exportcreate_only, overwrite, overwrite_and_prune

How syncs work says what each one does.

How you connect

You paste a credential you already hold. penv seals it and never shows it again.

FieldLabelKindRequiredWhat it is
apiTokenAPI tokensecret, masked here and sealedyes

What the connection asks for

Fixed when you connect, and shared by every mapping on it.

FieldLabelKindRequiredAdvancedWhat it is
accountIdAccount IDtextyesnoWorkers & Pages in the dashboard shows it in the right-hand column.

What a mapping asks for

Answered once per environment you map.

FieldLabelKindRequiredAdvancedWhat it is
projectNamePages projecttextyesnoThe project whose variables this environment maps onto.
environmentDeploymentschoiceyesyesEncrypted variables already there cannot be read back, so import skips them. One of Production, Preview. Starts at production.

Permissions it needs

penv probes for these when it verifies the connection.

PermissionDirectionsBlockingWithout it
Account Settings:Readevery directionyesWe cannot confirm the token reaches this account.
Cloudflare Pages:Readevery directionyesPreview cannot list the project's variables.
Cloudflare Pages:EditexportyesExport cannot write anything.