Azure / azure-dev

A developer CLI that reduces the time it takes for you to get started on Azure. The Azure Developer CLI (azd) provides a set of developer-friendly commands that map to key stages in your workflow - code, build, deploy, monitor, repeat.
https://aka.ms/azd
MIT License
410 stars 198 forks source link

[Feature] `azure.yml` `image` to support environment variable substitution #4124

Closed johnnyreilly closed 2 months ago

johnnyreilly commented 3 months ago

Output from azd version N/A

Describe the bug Not a bug, a missing feature!

Consider the following: azure.yml:

# yaml-language-server: $schema=https://raw.githubusercontent.com/Azure/azure-dev/main/schemas/v1.0/azure.yaml.json

name: my-container-app
metadata:
  template: azd-init@1.9.4
services:
  web:
    image: myregistry.azurecr.io/my-project/my-container-app:${WEB_VERSION_TAG}
    host: containerapp

The image property under services does not support environment substitution according to: https://raw.githubusercontent.com/Azure/azure-dev/main/schemas/v1.0/azure.yaml.json

However, the same image property under docker does support environment substitution according to: https://raw.githubusercontent.com/Azure/azure-dev/main/schemas/v1.0/azure.yaml.json

To Reproduce N/A

Expected behavior Wouldn't it be amazing if services.image did support environment substitution in the same way as docker.image?

Environment N/A

Additional context This came out the work done in this post: https://johnnyreilly.com/using-azd-for-faster-incremental-azure-container-app-deployments-in-azure-devops

rajeshkamal5050 commented 2 months ago

@wbreza can we fix this?