This issue is a: (mark with an x)
Issue description
- Using Bicep to deploy a container app
properties::template::containers::image is dynamically constructed using value from myContainerRegistry.properties.loginServer
- Failure: Container image value is not accepted due to invalid format
I believe during the initial check Bicep does not resolve the properties to a string value so the image input parameter validation fails. This particular check should probably not be part of the initial validation.
loginServer value is used as autoGeneratedDomainNameLabelScope is set for the container registry so the FQDN has a suffix added to the registry name which we do not know before the resource is deployed.
Steps to reproduce
param imageRepositoryName string
param imageTag string
resource containerRegistry 'Microsoft.ContainerRegistry/registries@2026-01-01-preview' existing = {
name: name
}
resource containerApp 'Microsoft.App/containerApps@2025-10-02-preview' = {
...
properties: {
template: {
containers: {
image: '${containerRegistry.properties.loginServer)/${imageRepositoryName}:${imageTag}'
}
}
}
}
Expected behavior
Image value dynamically constructed using container registry property is accepted.
Actual behavior
Fails with formatting error:
Container with name '***' has an invalid image format '[format('{0}/{1}:{2}', reference('/subscriptions/***/resourceGroups/**/providers/Microsoft.ContainerRegistry/registries/***', '2026-01-01-preview').loginServer, '***', '***')]'. Image must match format [registry/]repository[:tag][@digest].
Additional context
Bicep deployment.
This issue is a: (mark with an x)
Issue description
properties::template::containers::imageis dynamically constructed using value frommyContainerRegistry.properties.loginServerI believe during the initial check Bicep does not resolve the properties to a string value so the
imageinput parameter validation fails. This particular check should probably not be part of the initial validation.loginServervalue is used asautoGeneratedDomainNameLabelScopeis set for the container registry so the FQDN has a suffix added to the registry name which we do not know before the resource is deployed.Steps to reproduce
Expected behavior
Image value dynamically constructed using container registry property is accepted.
Actual behavior
Fails with formatting error:
Additional context
Bicep deployment.