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

New resource: azurerm_management_group_subscription_association #3555

Closed
richeney opened this issue May 30, 2019 · 4 comments · Fixed by #11069
Closed

New resource: azurerm_management_group_subscription_association #3555

richeney opened this issue May 30, 2019 · 4 comments · Fixed by #11069

Comments

@richeney
Copy link
Contributor

richeney commented May 30, 2019

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

New azurerm_management_group_subscription_association resource to decouple the management group definitions from the subscription membership.

Setting the tenancy level governance (management groups, custom policies and initiatives, mg level role and policy assignments) could be configured separately from the subscription association. An MSP could centralise their default governance in a module and then associate a subscription to an mg to inherit default role assignments and policy assignments.

Version 2.0 could remove subscription_ids list as an option from management groups, in line with other association changes.

New or Affected Resource(s)

New:

  • azurerm_management_group_subscription_association

Affected (2.0 - optional)

  • azurem_management_group

Potential Terraform Configuration

resource "azurerm_management_group" "non-prod" {
  display_name = "Non-Prod"
}

resource "azurerm_management_group" "dev" {
  display_name               = "Dev"
  parent_management_group_id = azurerm_management_group.non-prod.id
}

resource "azurerm_management_group_subscription_association" "project_x" {
  management_group_id      = azurerm_management_group.dev.id
  subscription_id          = "2d31be49-d999-4415-bb65-8aec2c90ba62"
}

References

  • #0000
@benc-uk
Copy link
Contributor

benc-uk commented Sep 18, 2020

Under investigation

@richeney
Copy link
Contributor Author

Picking this one up

@ghost
Copy link

ghost commented Apr 2, 2021

This has been released in version 2.54.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example:

provider "azurerm" {
    version = "~> 2.54.0"
}
# ... other configuration ...

@ghost
Copy link

ghost commented Apr 30, 2021

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!

@ghost ghost locked as resolved and limited conversation to collaborators Apr 30, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.