Skip to content

Add deploy support for explicit secrets#12732

Merged
jamesopstad merged 6 commits intomainfrom
james/secrets-property-deploy
Mar 23, 2026
Merged

Add deploy support for explicit secrets#12732
jamesopstad merged 6 commits intomainfrom
james/secrets-property-deploy

Conversation

@jamesopstad
Copy link
Contributor

@jamesopstad jamesopstad commented Mar 2, 2026

Add deploy support for the experimental secrets configuration property

When the new secrets property is defined, wrangler deploy now validates that all secrets declared in secrets.required are configured on the Worker before the deploy succeeds. If any required secrets are missing, the deploy fails with a clear error listing which secrets need to be set.

When secrets is not defined, the existing behavior is unchanged.

// wrangler.jsonc
{
	"secrets": {
		"required": ["API_KEY", "DB_PASSWORD"],
	},
}

  • Tests
    • Tests included/updated
    • Automated tests not possible - manual testing has been completed as follows:
    • Additional testing not necessary because:
  • Public documentation
    • Cloudflare docs PR(s):
    • Documentation not necessary because: to follow

A picture of a cute animal (not mandatory, but encouraged)


Open with Devin

@changeset-bot
Copy link

changeset-bot bot commented Mar 2, 2026

🦋 Changeset detected

Latest commit: d8634f6

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@pkg-pr-new
Copy link

pkg-pr-new bot commented Mar 2, 2026

create-cloudflare

npm i https://pkg.pr.new/create-cloudflare@12732

@cloudflare/kv-asset-handler

npm i https://pkg.pr.new/@cloudflare/kv-asset-handler@12732

miniflare

npm i https://pkg.pr.new/miniflare@12732

@cloudflare/pages-shared

npm i https://pkg.pr.new/@cloudflare/pages-shared@12732

@cloudflare/unenv-preset

npm i https://pkg.pr.new/@cloudflare/unenv-preset@12732

@cloudflare/vite-plugin

npm i https://pkg.pr.new/@cloudflare/vite-plugin@12732

@cloudflare/vitest-pool-workers

npm i https://pkg.pr.new/@cloudflare/vitest-pool-workers@12732

@cloudflare/workers-editor-shared

npm i https://pkg.pr.new/@cloudflare/workers-editor-shared@12732

wrangler

npm i https://pkg.pr.new/wrangler@12732

commit: d8634f6

@jamesopstad jamesopstad force-pushed the james/secrets-property-deploy branch from 2165c1f to 518966f Compare March 3, 2026 09:07
@jamesopstad jamesopstad force-pushed the james/secrets-property-deploy branch 4 times, most recently from 6065e7c to 669a731 Compare March 19, 2026 20:44
@github-actions
Copy link
Contributor

github-actions bot commented Mar 19, 2026

✅ All changesets look good

@jamesopstad jamesopstad marked this pull request as ready for review March 19, 2026 21:17
@jamesopstad jamesopstad requested a review from a team as a code owner March 19, 2026 21:17
@workers-devprod
Copy link
Contributor

workers-devprod commented Mar 19, 2026

Codeowners approval required for this PR:

  • ✅ @cloudflare/wrangler
Show detailed file reviewers

Copy link
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 4 additional findings.

Open in Devin Review

@jamesopstad jamesopstad force-pushed the james/secrets-property-deploy branch from f0337f6 to b5272c8 Compare March 20, 2026 10:33
@github-project-automation github-project-automation bot moved this from Untriaged to Approved in workers-sdk Mar 20, 2026
@jamesopstad jamesopstad force-pushed the james/secrets-property-deploy branch from b5272c8 to d8634f6 Compare March 23, 2026 10:31
@jamesopstad jamesopstad merged commit c2e9163 into main Mar 23, 2026
50 of 51 checks passed
@jamesopstad jamesopstad deleted the james/secrets-property-deploy branch March 23, 2026 11:17
@github-project-automation github-project-automation bot moved this from Approved to Done in workers-sdk Mar 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants