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 2 is deployed to the hub subscription when tier 2 subscription ID parameter is supplied #637

Closed
brooke-hamilton opened this issue Feb 8, 2022 · 0 comments · Fixed by #638
Assignees
Labels
bug Something isn't working Terraform Related to Terraform code Quick win

Comments

@brooke-hamilton
Copy link
Contributor

Description

The terraform parameter tier2_subid allows specifying that tier 2 is deployed to a subscription other than the subscription containing the network hub. However, supplying that parameter has no effect and the tier 2 resource group is deployed to the hub subscription anyway.

Steps to Reproduce

Steps to reproduce the behavior:

  1. Follow the guidance to set up an MLZ deployment using the Terraform template.
  2. Specify a subscription ID for tier 2 by setting the tier2_subid parameter.
  3. Deploy

Expected behavior

The tier 2 resource group has been deployed to the subscription specified in the tier2_subid parameter.

Actual behavior

The tier 2 resource group is deployed to the subscription containing the network hub.

Screenshots

Additional context

main.tf, line 99, has a coalesce statement that appears to have the parameters swapped.

subscription_id = coalesce(var.hub_subid, var.tier2_subid)

The deployment of other tiers have it the other way around, like line 83 for tier 1:

subscription_id = coalesce(var.tier1_subid, var.hub_subid)

Operating System: development container (Ubuntu)
Terraform Version: v1.1.2
Cloud (public, Azure Government, etc.): tested on Azure Government (but likely applies to all clouds)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Terraform Related to Terraform code Quick win
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

1 participant