terraform-azurerm-lz-vending
terraform-azurerm-lz-vending copied to clipboard
feat:Move and delete decomissioned subscriptions
- 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
When we remove a subscription using terraform, it is simply moved to the tenant root. Isn't the management group "Decommisioned" in the ALZ mgmt-structure supposed to be the target location for such decomissioned subscriptions?
Describe the solution you'd like
I would like that the decomissioned subscriptions would be moved to the "Decommisioned"-folder after terraform removes them. It would also be nice with functionality to clean up/remove them altogether after the "grace period" has ended.
Doesn't solve the above, but if you change the default management group to "Decommissioned" then all subscriptions removed from the config will get disabled and dropped there.
The caveat is that all newly create subscriptions also get placed there initially.
Upon destroy, the AzureRM provider will cancel and move the sub to the default MG.
If you use the new AzAPI option you have more control but you must orchestrate this outside the module.