diff --git a/cli/azd/resources/scaffold/base/modules/fetch-container-image.bicep b/cli/azd/resources/scaffold/base/modules/fetch-container-image.bicep index 17b00776d96..78d1e7eeb5e 100644 --- a/cli/azd/resources/scaffold/base/modules/fetch-container-image.bicep +++ b/cli/azd/resources/scaffold/base/modules/fetch-container-image.bicep @@ -1,7 +1,7 @@ param exists bool param name string -resource existingApp 'Microsoft.App/containerApps@2023-04-01-preview' existing = if (exists) { +resource existingApp 'Microsoft.App/containerApps@2023-05-02-preview' existing = if (exists) { name: name } diff --git a/cli/azd/resources/scaffold/base/shared/registry.bicep b/cli/azd/resources/scaffold/base/shared/registry.bicep index 613337e9d47..d6629f86201 100644 --- a/cli/azd/resources/scaffold/base/shared/registry.bicep +++ b/cli/azd/resources/scaffold/base/shared/registry.bicep @@ -15,8 +15,8 @@ param sku object = { } param zoneRedundancy string = 'Disabled' -// 2022-02-01-preview needed for anonymousPullEnabled -resource containerRegistry 'Microsoft.ContainerRegistry/registries@2022-02-01-preview' = { +// 2023-01-01-preview needed for anonymousPullEnabled +resource containerRegistry 'Microsoft.ContainerRegistry/registries@2023-01-01-preview' = { name: name location: location tags: tags diff --git a/cli/azd/resources/scaffold/templates/host-containerapp.bicept b/cli/azd/resources/scaffold/templates/host-containerapp.bicept index f4c75f04eed..3b3bd099ad9 100644 --- a/cli/azd/resources/scaffold/templates/host-containerapp.bicept +++ b/cli/azd/resources/scaffold/templates/host-containerapp.bicept @@ -47,11 +47,11 @@ resource identity 'Microsoft.ManagedIdentity/userAssignedIdentities@2023-01-31' location: location } -resource containerRegistry 'Microsoft.ContainerRegistry/registries@2022-02-01-preview' existing = { +resource containerRegistry 'Microsoft.ContainerRegistry/registries@2023-01-01-preview' existing = { name: containerRegistryName } -resource containerAppsEnvironment 'Microsoft.App/managedEnvironments@2023-04-01-preview' existing = { +resource containerAppsEnvironment 'Microsoft.App/managedEnvironments@2023-05-01' existing = { name: containerAppsEnvironmentName } @@ -79,7 +79,7 @@ module fetchLatestImage '../modules/fetch-container-image.bicep' = { } {{- if .DbRedis}} -resource redis 'Microsoft.App/containerApps@2023-04-01-preview' = { +resource redis 'Microsoft.App/containerApps@2023-05-02-preview' = { name: redisName location: location properties: { @@ -101,7 +101,7 @@ resource redis 'Microsoft.App/containerApps@2023-04-01-preview' = { } {{- end}} -resource app 'Microsoft.App/containerApps@2023-04-01-preview' = { +resource app 'Microsoft.App/containerApps@2023-05-02-preview' = { name: name location: location tags: union(tags, {'azd-service-name': '{{.Name}}' }) diff --git a/cli/azd/test/functional/testdata/samples/containerapp/infra/resources.bicep b/cli/azd/test/functional/testdata/samples/containerapp/infra/resources.bicep index d62d85db6e3..a35555b6c66 100644 --- a/cli/azd/test/functional/testdata/samples/containerapp/infra/resources.bicep +++ b/cli/azd/test/functional/testdata/samples/containerapp/infra/resources.bicep @@ -16,8 +16,8 @@ param sku object = { } param zoneRedundancy string = 'Disabled' -// 2022-02-01-preview needed for anonymousPullEnabled -resource containerRegistry 'Microsoft.ContainerRegistry/registries@2022-02-01-preview' = { +// 2023-01-01-preview needed for anonymousPullEnabled +resource containerRegistry 'Microsoft.ContainerRegistry/registries@2023-01-01-preview' = { name: 'cr${resourceToken}' location: location tags: tags diff --git a/cli/azd/test/functional/testdata/samples/containerapp/infra/web.bicep b/cli/azd/test/functional/testdata/samples/containerapp/infra/web.bicep index b8c9d5d33f4..b76da45914e 100644 --- a/cli/azd/test/functional/testdata/samples/containerapp/infra/web.bicep +++ b/cli/azd/test/functional/testdata/samples/containerapp/infra/web.bicep @@ -6,7 +6,7 @@ param containerAppsEnvironmentName string var tags = { 'azd-env-name': environmentName } var resourceToken = toLower(uniqueString(subscription().id, environmentName, location)) -resource containerRegistry 'Microsoft.ContainerRegistry/registries@2022-02-01-preview' existing = { +resource containerRegistry 'Microsoft.ContainerRegistry/registries@2023-01-01-preview' existing = { name: containerRegistryName } @@ -14,7 +14,7 @@ resource containerAppsEnvironment 'Microsoft.App/managedEnvironments@2022-03-01' name: containerAppsEnvironmentName } -resource app 'Microsoft.App/containerApps@2022-03-01' = { +resource app 'Microsoft.App/containerApps@2023-05-02-preview' = { name: 'ca-${resourceToken}' location: location tags: union(tags, { 'azd-service-name': 'web' }) diff --git a/templates/common/infra/bicep/core/host/container-app-upsert.bicep b/templates/common/infra/bicep/core/host/container-app-upsert.bicep index 3eec62f2954..f4a493d0d2f 100644 --- a/templates/common/infra/bicep/core/host/container-app-upsert.bicep +++ b/templates/common/infra/bicep/core/host/container-app-upsert.bicep @@ -67,7 +67,7 @@ param serviceBinds array = [] @description('The target port for the container') param targetPort int = 80 -resource existingApp 'Microsoft.App/containerApps@2023-04-01-preview' existing = if (exists) { +resource existingApp 'Microsoft.App/containerApps@2023-05-02-preview' existing = if (exists) { name: name } diff --git a/templates/common/infra/bicep/core/host/container-app.bicep b/templates/common/infra/bicep/core/host/container-app.bicep index 3724086d24d..ba8d7ee0737 100644 --- a/templates/common/infra/bicep/core/host/container-app.bicep +++ b/templates/common/infra/bicep/core/host/container-app.bicep @@ -89,7 +89,7 @@ module containerRegistryAccess '../security/registry-access.bicep' = if (usePriv } } -resource app 'Microsoft.App/containerApps@2023-04-01-preview' = { +resource app 'Microsoft.App/containerApps@2023-05-02-preview' = { name: name location: location tags: tags @@ -150,7 +150,7 @@ resource app 'Microsoft.App/containerApps@2023-04-01-preview' = { } } -resource containerAppsEnvironment 'Microsoft.App/managedEnvironments@2023-04-01-preview' existing = { +resource containerAppsEnvironment 'Microsoft.App/managedEnvironments@2023-05-01' existing = { name: containerAppsEnvironmentName } diff --git a/templates/common/infra/bicep/core/host/container-apps-environment.bicep b/templates/common/infra/bicep/core/host/container-apps-environment.bicep index 8633ba48792..20f4632e0d7 100644 --- a/templates/common/infra/bicep/core/host/container-apps-environment.bicep +++ b/templates/common/infra/bicep/core/host/container-apps-environment.bicep @@ -12,7 +12,7 @@ param daprEnabled bool = false @description('Name of the Log Analytics workspace') param logAnalyticsWorkspaceName string -resource containerAppsEnvironment 'Microsoft.App/managedEnvironments@2023-04-01-preview' = { +resource containerAppsEnvironment 'Microsoft.App/managedEnvironments@2023-05-01' = { name: name location: location tags: tags diff --git a/templates/common/infra/bicep/core/host/container-registry.bicep b/templates/common/infra/bicep/core/host/container-registry.bicep index 9c64531b965..26b4d2ffdb5 100644 --- a/templates/common/infra/bicep/core/host/container-registry.bicep +++ b/templates/common/infra/bicep/core/host/container-registry.bicep @@ -34,8 +34,8 @@ param zoneRedundancy string = 'Disabled' @description('The log analytics workspace ID used for logging and monitoring') param workspaceId string = '' -// 2022-02-01-preview needed for anonymousPullEnabled -resource containerRegistry 'Microsoft.ContainerRegistry/registries@2022-02-01-preview' = { +// 2023-01-01-preview needed for anonymousPullEnabled +resource containerRegistry 'Microsoft.ContainerRegistry/registries@2023-01-01-preview' = { name: name location: location tags: tags diff --git a/templates/common/infra/bicep/core/security/registry-access.bicep b/templates/common/infra/bicep/core/security/registry-access.bicep index 5335efabc8b..fc66837a12d 100644 --- a/templates/common/infra/bicep/core/security/registry-access.bicep +++ b/templates/common/infra/bicep/core/security/registry-access.bicep @@ -14,6 +14,6 @@ resource aksAcrPull 'Microsoft.Authorization/roleAssignments@2022-04-01' = { } } -resource containerRegistry 'Microsoft.ContainerRegistry/registries@2022-02-01-preview' existing = { +resource containerRegistry 'Microsoft.ContainerRegistry/registries@2023-01-01-preview' existing = { name: containerRegistryName }