Skip to content

Commit

Permalink
Update Azure Container Apps API version 2023-04-01-preview on Retirem…
Browse files Browse the repository at this point in the history
…ent (#3076)
  • Loading branch information
vhvb1989 authored Feb 27, 2024
1 parent 686b23b commit a6f6446
Show file tree
Hide file tree
Showing 10 changed files with 18 additions and 18 deletions.
Original file line number Diff line number Diff line change
@@ -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
}

Expand Down
4 changes: 2 additions & 2 deletions cli/azd/resources/scaffold/base/shared/registry.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions cli/azd/resources/scaffold/templates/host-containerapp.bicept
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down Expand Up @@ -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: {
Expand All @@ -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}}' })
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ 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
}

resource containerAppsEnvironment 'Microsoft.App/managedEnvironments@2022-03-01' existing = {
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' })
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
4 changes: 2 additions & 2 deletions templates/common/infra/bicep/core/host/container-app.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

0 comments on commit a6f6446

Please sign in to comment.