Reference
Cloudflare Pages
Move environment variables to and from a Pages project.
Move environment variables to and from a Pages project.
The connection
| What | This provider |
|---|---|
| Vendor | Cloudflare |
| Key | cloudflare-pages |
| Availability | available. You can connect it today. |
| Credential penv holds | cloudflare-token |
| Values read back | yes |
| Activation | on-next-deploy |
What it moves
| Direction | What it does |
|---|---|
import | Reads names and values out of the store into penv. |
export | Writes 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
| Direction | Policies you can pick |
|---|---|
import | skip_existing, new_version, fail |
export | create_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.
| Field | Label | Kind | Required | What it is |
|---|---|---|---|---|
apiToken | API token | secret, masked here and sealed | yes |
What the connection asks for
Fixed when you connect, and shared by every mapping on it.
| Field | Label | Kind | Required | Advanced | What it is |
|---|---|---|---|---|---|
accountId | Account ID | text | yes | no | Workers & Pages in the dashboard shows it in the right-hand column. |
What a mapping asks for
Answered once per environment you map.
| Field | Label | Kind | Required | Advanced | What it is |
|---|---|---|---|---|---|
projectName | Pages project | text | yes | no | The project whose variables this environment maps onto. |
environment | Deployments | choice | yes | yes | Encrypted 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.
| Permission | Directions | Blocking | Without it |
|---|---|---|---|
Account Settings:Read | every direction | yes | We cannot confirm the token reaches this account. |
Cloudflare Pages:Read | every direction | yes | Preview cannot list the project's variables. |
Cloudflare Pages:Edit | export | yes | Export cannot write anything. |