Don't see command for updating a secret in EAS CLI

EAS CLI: eas-cli/0.34.1 darwin-arm64 node-v14.18.1

There doesn’t seem to be a way of updating a secret value using the CLI and calling eas secret:create fails if the secret already exists:

CombinedError: [GraphQL] This project already has an environment secret named "XXXX". Please choose another name or edit the existing secret.

Is updating a secret on the CLI roadmap?

you can delete the secret and then create a new one with the same name

edit: to elaborate, we may add support for updating in the future :slight_smile:

That would be awesome!

I attempted to script the deletion of every secret but it seems the ecs secret:delete command does not have a -y option or accept a stdin value of yes for example in order to automate this.

Any suggestions?

you could send a pr to eas-cli to accept stdin for yes: GitHub - expo/eas-cli: Fastest way to build, submit, and update iOS and Android apps

also, out of curiosity - can you explain your use case and why you have a lot of secrets that you need to update?

I ended up getting around the issue by using the --force option for eas secret:create.

In terms of why there are multiple secrets to create, I’m the Developer Advocate from Doppler and our customers want to use us not just for managing secrets, but to sync them to their CI/CD platform.

1 Like

oh interesting! thanks for sharing

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.