You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
are automatically replaced with their corresponding values. I'm wondering if it's possible to define custom environment variables that work the same way.
For example, if I execute:
azd env set TEST_ENV_VALUE test
can I have that value injected into my container YAML? Ideally, I’d like to have something like:
template:
containers:
- image: image:1234name: containernameenv:
- name: TEST_VALUEvalue: test
I tried this but got the error:
ERROR: error executing step command 'deploy --all': failed deploying service 'containername': failed executing template file: template: manifest template:34:34: executing "manifest template" at <.Env.TEST_ENV_VALUE>: map has no entry for key "TEST_ENV_VALUE"
I know I could use envsubst or another replacement tool, but it would be great to use azd since it already handles predefined variables. Is this functionality possible in any way?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I'm noticing that when I run
azd up
, placeholders in the containers YAML inside the Apphost like these:are automatically replaced with their corresponding values. I'm wondering if it's possible to define custom environment variables that work the same way.
For example, if I execute:
can I have that value injected into my container YAML? Ideally, I’d like to have something like:
automatically transformed to:
I tried this but got the error:
I know I could use
envsubst
or another replacement tool, but it would be great to useazd
since it already handles predefined variables. Is this functionality possible in any way?Beta Was this translation helpful? Give feedback.
All reactions