File tree Expand file tree Collapse file tree
blueprints/gh-aspnet-webapp/bicep Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ permissions:
3434 security-events : write
3535
3636env :
37- DEFAULT_INSTANCE_NUMBER : " 005 " # default instance number if not provided
37+ DEFAULT_INSTANCE_NUMBER : " 007 " # default instance number if not provided
3838 DEFAULT_AZURE_LOCATION : " canadacentral" # default Azure region if not provided
3939 SRC_PROJECT_PATH : " /webapp01/webapp01.csproj"
4040 AZURE_WEBAPP_PACKAGE_PATH : " ./src" # set this to the path to your web app project, defaults to the repository root
7474 $appServicePlanName = "asp-gh-aspnet-webapp-$instanceNumber"
7575 $webAppName = "app-gh-aspnet-webapp-$instanceNumber"
7676 $resourceGroupName = "rg-gh-aspnet-webapp-$instanceNumber"
77- $containerImage = "$acrName.azurecr.io/ webapp01:latest"
77+ $containerImageName = "webapp01:latest"
7878
7979 # Deployment name based only on instance number for idempotence
8080 $deploymentName = "deploy-infra-$instanceNumber"
9898 --parameters appServicePlanName=$appServicePlanName `
9999 --parameters webAppName=$webAppName `
100100 --parameters location=$location `
101- --parameters containerImage=$containerImage `
101+ --parameters containerImageName=$containerImageName `
102102 --parameters resourceGroupName=$resourceGroupName `
103103 --query "properties.outputs" -o json
104104
Original file line number Diff line number Diff line change @@ -15,8 +15,8 @@ param webAppName string
1515@description ('The location for all resources' )
1616param location string
1717
18- @description ('The container image to deploy ' )
19- param containerImage string
18+ @description ('The container image name without registry prefix (e.g., webapp01:latest) ' )
19+ param containerImageName string = 'webapp01:latest'
2020
2121@description ('The name of the Resource Group' )
2222param resourceGroupName string = 'rg-webapp01-dev'
@@ -42,7 +42,7 @@ module resourcesInRG './resources.bicep' = {
4242 appServicePlanName : '${appServicePlanName }-${uniqueSuffix }'
4343 webAppName : '${webAppName }-${uniqueSuffix }'
4444 location : location
45- containerImage : containerImage
45+ containerImageName : containerImageName
4646 }
4747}
4848
Original file line number Diff line number Diff line change @@ -13,8 +13,8 @@ param webAppName string
1313@description ('The location for all resources' )
1414param location string
1515
16- @description ('The container image to deploy ' )
17- param containerImage string
16+ @description ('The container image name without registry prefix (e.g., webapp01:latest) ' )
17+ param containerImageName string = 'webapp01:latest'
1818
1919// Deploy the Azure Container Registry
2020resource acr 'Microsoft.ContainerRegistry/registries@2023-01-01-preview' = {
@@ -58,18 +58,18 @@ resource webApp 'Microsoft.Web/sites@2024-04-01' = {
5858 appSettings : [
5959 {
6060 name : 'DOCKER_REGISTRY_SERVER_URL'
61- value : 'https://${acr .name }.azurecr.io '
61+ value : 'https://${acr .properties . loginServer } '
6262 }
6363 {
6464 name : 'WEBSITES_ENABLE_APP_SERVICE_STORAGE'
6565 value : 'false'
6666 }
6767 {
6868 name : 'DOCKER_CUSTOM_IMAGE_NAME'
69- value : containerImage
69+ value : '${ acr . properties . loginServer }/${ containerImageName }'
7070 }
7171 ]
72- linuxFxVersion : 'DOCKER|${containerImage }' // Specify the container image
72+ linuxFxVersion : 'DOCKER|${acr . properties . loginServer }/${ containerImageName }'
7373 }
7474 }
7575}
You can’t perform that action at this time.
0 commit comments