Skip to content

Commit 62a9512

Browse files
committed
making the worker no-ingress
1 parent 8a9c459 commit 62a9512

File tree

2 files changed

+51
-2
lines changed

2 files changed

+51
-2
lines changed

Azure/container_app_no_ingress.bicep

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
param name string
2+
param location string = resourceGroup().location
3+
param containerAppEnvironmentId string
4+
param repositoryImage string = 'mcr.microsoft.com/azuredocs/containerapps-helloworld:latest'
5+
param envVars array = []
6+
param registry string
7+
param minReplicas int = 1
8+
param maxReplicas int = 1
9+
param registryUsername string
10+
@secure()
11+
param registryPassword string
12+
13+
resource containerApp 'Microsoft.App/containerApps@2022-01-01-preview' ={
14+
name: name
15+
location: location
16+
properties:{
17+
managedEnvironmentId: containerAppEnvironmentId
18+
configuration: {
19+
activeRevisionsMode: 'multiple'
20+
secrets: [
21+
{
22+
name: 'container-registry-password'
23+
value: registryPassword
24+
}
25+
]
26+
registries: [
27+
{
28+
server: registry
29+
username: registryUsername
30+
passwordSecretRef: 'container-registry-password'
31+
}
32+
]
33+
}
34+
template: {
35+
containers: [
36+
{
37+
image: repositoryImage
38+
name: name
39+
env: envVars
40+
}
41+
]
42+
scale: {
43+
minReplicas: minReplicas
44+
maxReplicas: maxReplicas
45+
}
46+
}
47+
}
48+
}
49+
50+
output fqdn string = containerApp.properties.configuration.ingress.fqdn

Azure/main.bicep

+1-2
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ module service 'container_app.bicep' = {
6161
}
6262

6363
// create the worker container app
64-
module worker 'container_app.bicep' = {
64+
module worker 'container_app_no_ingress.bicep' = {
6565
name: 'worker'
6666
params: {
6767
name: 'worker'
@@ -71,7 +71,6 @@ module worker 'container_app.bicep' = {
7171
containerAppEnvironmentId: env.outputs.id
7272
registry: acr.name
7373
envVars: union(shared_config, client_config)
74-
externalIngress: false
7574
}
7675
}
7776

0 commit comments

Comments
 (0)