Action
We use envsubst to replace values in a YAML to allow us to reuse the template in multiple environments.
We would like to pipe the modified YAML into Azure CLI and use this as a stdin file (using @-):
envsubst < containers-template.yaml | az container create -g some-resource-group --file @-`
Expected outcome
Creates a container using the modified YAML
Actual outcome
Azure CLI tries to parse each line as a "YAML" file
No such file or directory: api-version: 2019-12-01
location: centralus
name: aci-name-of-container-group
<< shorten for brevity >>
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
Action
We use envsubst to replace values in a YAML to allow us to reuse the template in multiple environments.
We would like to pipe the modified YAML into Azure CLI and use this as a stdin file (using
@-):Expected outcome
Creates a container using the modified YAML
Actual outcome
Azure CLI tries to parse each line as a "YAML" file
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.