Set App Platform environment variables via CLI

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?

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

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.

Best, Dikshith