By Skovisen
Lets say you have specified an encrypted app wide environment variable in the app spec. Now you wish to use this environment variable as a value for a field inside the app spec. Is it possible?
Concrete example: I wish to forward logs to Logtail. In order to do that, I need to set up log_destinations and provide a token. I don’t wish to upload the token to version control, and thus instead specify the token as an encrypted app wide environment variable. Is it possible to somehow use this same environment variable as value for the “token” field?
If not, is there a way to inject environment variables into the app spec file e.g. from github environment variables?
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!
Hey there!
This is a good idea, but unfortunately not something that App Platform supports. ENV variables would only be available within the application itself and not readable by the app spec file. I would suggest adding it to our ideas page: DigitalOcean Ideas
You possibly could create those variables outside of version control on your local machine or use Github variables to store them. You could then write your own script to generate your app spec with those variables and deploy your app with DOCTL
Hope it helps! Nate
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.