From 5f2babaefe26a7318a2c87c86652837494bdb301 Mon Sep 17 00:00:00 2001 From: LManning-Dev <54150471+LManning-Dev@users.noreply.github.com> Date: Mon, 18 Jul 2022 23:10:57 -0400 Subject: [PATCH] Update tier3.bicep Creation in correct Subscription Tier3s don't get created in the target subscription. Instead, they get created the -currently logged on- subscription. This update will correct that and close issue #724 --- src/bicep/add-ons/tier3/tier3.bicep | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/bicep/add-ons/tier3/tier3.bicep b/src/bicep/add-ons/tier3/tier3.bicep index eb31c556f..531b7f806 100644 --- a/src/bicep/add-ons/tier3/tier3.bicep +++ b/src/bicep/add-ons/tier3/tier3.bicep @@ -119,6 +119,7 @@ var calculatedTags = union(tags, defaultTags) module resourceGroup '../../modules/resource-group.bicep' = { name: workloadResourceGroupName + scope: subscription(workloadSubscriptionId) params: { name: workloadResourceGroupName location: location @@ -128,7 +129,7 @@ module resourceGroup '../../modules/resource-group.bicep' = { module spokeNetwork '../../core/spoke-network.bicep' = { name: 'spokeNetwork' - scope: az.resourceGroup(resourceGroup.name) + scope: az.resourceGroup(workloadSubscriptionId, resourceGroup.name) params: { tags: calculatedTags location:location @@ -157,6 +158,7 @@ module spokeNetwork '../../core/spoke-network.bicep' = { module workloadVirtualNetworkPeerings '../../core/spoke-network-peering.bicep' = { name: take('${workloadName}-to-hub-vnet-peering', 64) + scope: subscription(workloadSubscriptionId) params: { spokeName: workloadName spokeResourceGroupName: resourceGroup.name