Skip to content

Allow updating secret-store secrets by name (instead of id) #10610

@alexkli

Description

@alexkli

Describe the solution

It would be very convenient if the wrangler secrets-store secret update command would support an option --name <name> that would update the secret by name, without the need to pass the secret id.

Reason

Currently wrangler secrets-store secret update and the Patch a secret API require knowing the secret id. This makes it difficult to programmatically update a secret, e.g. for a secret rotation script.

One has to first call the command/API to list all secrets, parse the result, find the secret by name, get the id and then make the actual update command/request.

The cloudflare dashboard UI does not have this issue - I can select and edit a secret by name. From a worker developer/devops perspective, secret ids are an implementation detail that we normally don't care about at all.

Secret names have to be unique in the first place, so this should not create any issues.

Metadata

Metadata

Assignees

No one assigned

    Labels

    internalRequires support from the Cloudflare Platformsecrets-store
    No fields configured for Feature.

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions