Skip to content

Commit

Permalink
Update tier3.bicep Creation in correct Subscription
Browse files Browse the repository at this point in the history
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 Azure#724
  • Loading branch information
LManning-Dev committed Jul 19, 2022
1 parent 585546c commit 5f2baba
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/bicep/add-ons/tier3/tier3.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 5f2baba

Please sign in to comment.