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.
Describe the solution
It would be very convenient if the
wrangler secrets-store secret updatecommand 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.