Skip to content

Commit 69c2751

Browse files
authored
fix(bicep): resolve conditional scope error in container registry module (#232)
1 parent 98fae47 commit 69c2751

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

infra/core/host/container-apps.bicep

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ param containerRegistryAdminUserEnabled bool = false
1010
param logAnalyticsWorkspaceName string
1111
param applicationInsightsName string = ''
1212

13+
var containerRegistryScope = !empty(containerRegistryResourceGroupName)
14+
? resourceGroup(containerRegistryResourceGroupName)
15+
: resourceGroup()
16+
1317
module containerAppsEnvironment 'container-apps-environment.bicep' = {
1418
name: '${name}-container-apps-environment'
1519
params: {
@@ -23,7 +27,7 @@ module containerAppsEnvironment 'container-apps-environment.bicep' = {
2327

2428
module containerRegistry 'container-registry.bicep' = {
2529
name: '${name}-container-registry'
26-
scope: !empty(containerRegistryResourceGroupName) ? resourceGroup(containerRegistryResourceGroupName) : resourceGroup()
30+
scope: containerRegistryScope
2731
params: {
2832
name: containerRegistryName
2933
location: location

0 commit comments

Comments
 (0)