You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The azurerm provider requires a subscription_id argument (or a respective environment variable). However, not all resources provided by azurerm are actually scoped within a subscription (e.g. azurerm_management_group).
I have a Terraform configuration that is bootstrapping the initial management group structure of an organization. This configuration creates Management Group structure's only. However, I cannot initialize the azurerm provider without providing a subscription Id - which I don't have (, yet).
New or Affected Resource(s)
azurerm
Potential Terraform Configuration
Add a new argument management_group_name and make either management_group_name or subscription_id mandatory.
If subscription_id is not set, the creation of resources scoped within a subscription should fail.
# Copy-paste your Terraform configurations here - for large Terraform configs,# please use a service like Dropbox and share a link to the ZIP file. For# security, you can also encrypt the files using our GPG public key.
References
#0000
The text was updated successfully, but these errors were encountered:
schwarzzz
changed the title
Support for [thing]
Initialization of azurerm for Management Groups
May 27, 2021
Hi there and thank you for reporting this. I'll share my view on the topic here and let people with more clue on this either confirm or deny, but this is a bit of a chicken and egg thing. Unfortunately subscription ID is a config parameter provider can not work without. It's being used all over the place to construct resource IDs for virtually everything.
My best bet here - you'll have to create your first sub by hand and import it into the state.
I don't think we'll be able to initialize provider without subscription ID.
Community Note
Description
The
azurerm
provider requires asubscription_id
argument (or a respective environment variable). However, not all resources provided byazurerm
are actually scoped within a subscription (e.g.azurerm_management_group
).I have a Terraform configuration that is bootstrapping the initial management group structure of an organization. This configuration creates Management Group structure's only. However, I cannot initialize the
azurerm
provider without providing a subscription Id - which I don't have (, yet).New or Affected Resource(s)
Potential Terraform Configuration
Add a new argument
management_group_name
and make eithermanagement_group_name
orsubscription_id
mandatory.If
subscription_id
is not set, the creation of resources scoped within a subscription should fail.References
The text was updated successfully, but these errors were encountered: