Skip to content

Commit 6388995

Browse files
committed
Add revisions param to container app module
1 parent 4275563 commit 6388995

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

deploy/container-http.bicep

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ param registryPassword string
1212
param minReplicas int = 0
1313
param secrets array = []
1414
param env array = []
15+
param revisionMode string = 'Single'
1516

1617

1718
resource environment 'Microsoft.App/managedEnvironments@2022-03-01' existing = {
@@ -24,6 +25,7 @@ resource containerApp 'Microsoft.App/containerApps@2022-03-01' = {
2425
properties: {
2526
managedEnvironmentId: environment.id
2627
configuration: {
28+
activeRevisionsMode: revisionMode
2729
secrets: secrets
2830
registries: isPrivateRegistry ? [
2931
{
@@ -36,6 +38,12 @@ resource containerApp 'Microsoft.App/containerApps@2022-03-01' = {
3638
external: isExternalIngress
3739
targetPort: containerPort
3840
transport: 'auto'
41+
traffic: [
42+
{
43+
latestRevision: true
44+
weight: 100
45+
}
46+
]
3947
} : null
4048
dapr: {
4149
enabled: true

deploy/main.bicep

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ module pythonService 'container-http.bicep' = {
7777
containerRegistry: containerRegistry
7878
registryPassword: registryPassword
7979
containerRegistryUsername: containerRegistryUsername
80-
80+
revisionMode: 'Single'
8181
secrets: [
8282
{
8383
name: registryPassword
@@ -144,6 +144,7 @@ module goService 'container-http.bicep' = {
144144
containerRegistry: containerRegistry
145145
registryPassword: registryPassword
146146
containerRegistryUsername: containerRegistryUsername
147+
revisionMode: 'Single'
147148
secrets: isPrivateRegistry ? [
148149
{
149150
name: registryPassword
@@ -173,6 +174,7 @@ module nodeService 'container-http.bicep' = {
173174
containerRegistry: containerRegistry
174175
registryPassword: registryPassword
175176
containerRegistryUsername: containerRegistryUsername
177+
revisionMode: 'Multiple'
176178
env: [
177179
{
178180
name: 'ORDER_SERVICE_NAME'

0 commit comments

Comments
 (0)