Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tier 3 Creates the Resource Group in the wrong subscription #724

Closed
LManning-Dev opened this issue Jul 18, 2022 · 0 comments · Fixed by #726
Closed

Tier 3 Creates the Resource Group in the wrong subscription #724

LManning-Dev opened this issue Jul 18, 2022 · 0 comments · Fixed by #726
Labels
bug Something isn't working

Comments

@LManning-Dev
Copy link
Contributor

LManning-Dev commented Jul 18, 2022

Description

When a Tier 3 is deployed, it gets created in the -currently logged into- subscription. It is missing the scope

Steps to Reproduce

Log into any Subscription other than the Tier 3 subscription in the same tenant.
Deploy Tier 3 and specify a workloadSubscriptionId parameter

Expected behavior

Resource Group should be created in the Tier 3 Subscription

Actual behavior

Resource Group is created in the currently logged into tenant

Screenshots

Additional context

The Resource Group Module on line 120 should have a scope to the tier3 (workload) subscription
Some other scopes need to be tweaked

module resourceGroup '../../modules/resource-group.bicep' = {
name: workloadResourceGroupName
scope: subscription(workloadSubscriptionId)
params: {
name: workloadResourceGroupName
location: location
tags: calculatedTags
}
}

module spokeNetwork '../../core/spoke-network.bicep' = {
name: 'spokeNetwork'
scope: az.resourceGroup(workloadSubscriptionId, resourceGroup.name)

module workloadVirtualNetworkPeerings '../../core/spoke-network-peering.bicep' = {
name: take('${workloadName}-to-hub-vnet-peering', 64)
scope: subscription(workloadSubscriptionId)

@LManning-Dev LManning-Dev added the bug Something isn't working label Jul 18, 2022
LManning-Dev added a commit to LManning-Dev/missionlz that referenced this issue Jul 19, 2022
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
LManning-Dev added a commit to LManning-Dev/missionlz that referenced this issue Jul 19, 2022
Tier 3 does not deploy policy.

Note: The Scope is dependent on issue Azure#724 as it will reference the the resource group in the tier3 subscription
lisamurphy-msft added a commit that referenced this issue Aug 29, 2022
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

Co-authored-by: lisamurphy-msft <[email protected]>
lisamurphy-msft added a commit that referenced this issue Sep 7, 2022
* tier3 deploy policy #727

Tier 3 does not deploy policy.

Note: The Scope is dependent on issue #724 as it will reference the the resource group in the tier3 subscription

* Updating Tier3 ReadMe

Adding optional parameters deployPolicy and policy to the tier 3 readme

* Adding new outputs to MLZ Core Readme

Adding new outputs to MLZ Core Readme

Co-authored-by: lisamurphy-msft <[email protected]>
jwaltireland pushed a commit to ARPA-H/AzureMissionLZ that referenced this issue Nov 14, 2024
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

Co-authored-by: lisamurphy-msft <[email protected]>
jwaltireland pushed a commit to ARPA-H/AzureMissionLZ that referenced this issue Nov 14, 2024
* tier3 deploy policy Azure#727

Tier 3 does not deploy policy.

Note: The Scope is dependent on issue Azure#724 as it will reference the the resource group in the tier3 subscription

* Updating Tier3 ReadMe

Adding optional parameters deployPolicy and policy to the tier 3 readme

* Adding new outputs to MLZ Core Readme

Adding new outputs to MLZ Core Readme

Co-authored-by: lisamurphy-msft <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant