Skip to content

Commit

Permalink
aspire: Write container registry name as an output
Browse files Browse the repository at this point in the history
It can be helpful to have just the bare name of the container registry
(without the suffix (e.g. `azurecr.io`)) when orchestrating things together.

This change adds `AZURE_CONTAINER_REGISTRY_NAME` as an output when
`azd` creates a container registry.
  • Loading branch information
ellismg committed Oct 17, 2024
1 parent 0595f33 commit 25532ec
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions cli/azd/resources/apphost/templates/main.bicept
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ output AZURE_LOG_ANALYTICS_WORKSPACE_NAME string = resources.outputs.AZURE_LOG_A
{{if .HasContainerRegistry -}}
output AZURE_CONTAINER_REGISTRY_ENDPOINT string = resources.outputs.AZURE_CONTAINER_REGISTRY_ENDPOINT
output AZURE_CONTAINER_REGISTRY_MANAGED_IDENTITY_ID string = resources.outputs.AZURE_CONTAINER_REGISTRY_MANAGED_IDENTITY_ID
output AZURE_CONTAINER_REGISTRY_NAME string = resources.outputs.AZURE_CONTAINER_REGISTRY_NAME
{{end -}}
{{if .HasContainerEnvironment -}}
output AZURE_CONTAINER_APPS_ENVIRONMENT_NAME string = resources.outputs.AZURE_CONTAINER_APPS_ENVIRONMENT_NAME
Expand Down
1 change: 1 addition & 0 deletions cli/azd/resources/apphost/templates/resources.bicept
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,7 @@ output AZURE_LOG_ANALYTICS_WORKSPACE_ID string = logAnalyticsWorkspace.id
{{if .HasContainerRegistry -}}
output AZURE_CONTAINER_REGISTRY_ENDPOINT string = containerRegistry.properties.loginServer
output AZURE_CONTAINER_REGISTRY_MANAGED_IDENTITY_ID string = managedIdentity.id
output AZURE_CONTAINER_REGISTRY_NAME string = containerRegistry.name
{{end -}}
{{if .HasContainerEnvironment -}}
output AZURE_CONTAINER_APPS_ENVIRONMENT_NAME string = containerAppEnvironment.name
Expand Down

0 comments on commit 25532ec

Please sign in to comment.