From fbbe1d2ae4b44418ceb0446ba76e4a209c93a417 Mon Sep 17 00:00:00 2001 From: Daniel Walsh Date: Wed, 26 Apr 2023 12:10:03 +0100 Subject: [PATCH] Add changelog and docs --- .changelog/2399.txt | 3 +++ docs/resources/pages_project.md | 9 +++++++++ 2 files changed, 12 insertions(+) create mode 100644 .changelog/2399.txt diff --git a/.changelog/2399.txt b/.changelog/2399.txt new file mode 100644 index 00000000000..433edd9826e --- /dev/null +++ b/.changelog/2399.txt @@ -0,0 +1,3 @@ +```release-note:enhancement +resource/cloudflare_pages_project: added secrets to Pages project. Secrets are encrypted environment variables, ideal for secrets such as API tokens. See documentation here: https://developers.cloudflare.com/pages/platform/functions/bindings/#secrets +``` diff --git a/docs/resources/pages_project.md b/docs/resources/pages_project.md index 9c91862daad..0337b4c356d 100644 --- a/docs/resources/pages_project.md +++ b/docs/resources/pages_project.md @@ -68,6 +68,9 @@ resource "cloudflare_pages_project" "deployment_configs" { environment_variables = { ENVIRONMENT = "preview" } + secrets = { + TURNSTILE_SECRET = "1x0000000000000000000000000000000AA" + } kv_namespaces = { KV_BINDING = "5eb63bbbe01eeed093cb22bb8f5acdc3" } @@ -88,6 +91,10 @@ resource "cloudflare_pages_project" "deployment_configs" { ENVIRONMENT = "production" OTHER_VALUE = "other value" } + secrets = { + TURNSTILE_SECRET = "1x0000000000000000000000000000000AA" + TURNSTILE_INVIS_SECRET = "2x0000000000000000000000000000000AA" + } kv_namespaces = { KV_BINDING_1 = "5eb63bbbe01eeed093cb22bb8f5acdc3" KV_BINDING_2 = "3cdca5f8bb22bc390deee10ebbb36be5" @@ -167,6 +174,7 @@ Optional: - `fail_open` (Boolean) Fail open used for Pages Functions. Defaults to `false`. - `kv_namespaces` (Map of String) KV namespaces used for Pages Functions. - `r2_buckets` (Map of String) R2 Buckets used for Pages Functions. +- `secrets` (Map of String) Encrypted environment variables for Pages Functions. - `service_binding` (Block Set) Services used for Pages Functions. (see [below for nested schema](#nestedblock--deployment_configs--preview--service_binding)) - `usage_model` (String) Usage model used for Pages Functions. Defaults to `bundled`. @@ -198,6 +206,7 @@ Optional: - `fail_open` (Boolean) Fail open used for Pages Functions. Defaults to `false`. - `kv_namespaces` (Map of String) KV namespaces used for Pages Functions. - `r2_buckets` (Map of String) R2 Buckets used for Pages Functions. +- `secrets` (Map of String) Encrypted environment variables for Pages Functions. - `service_binding` (Block Set) Services used for Pages Functions. (see [below for nested schema](#nestedblock--deployment_configs--production--service_binding)) - `usage_model` (String) Usage model used for Pages Functions. Defaults to `bundled`.