Currently, the doctl apps CLI does not provide a way to set environment variables, requiring them to be hard-coded into the App Spec YAML which isn’t great for security.

I would love to see the addition of something like the following which would allow environment variables to be updated programmatically without requiring updating the App Spec document directly:

doctl apps set-env --env services --scope RUN_TIME --type SECRET MY_SECRET="SECRET_VALUE"

Are there any plans to add such functionality to the App Platform CLI?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer

Hello @ryanblunden

Currently, we don’t have any plans of adding this functionality in CLI (doctl). I know similar functionality is available in kubectl where you can use imperative commands to make those changes. However, I encourage you to share your thoughts about this on our ideas page:

We’re constantly looking to improve all aspects of our service and welcome any other ideas or feedback you have! By sharing your thoughts there, it helps us to better prioritize working on the features that you feel need more attention.