Good morning,
I’m using Terraform 0.12 with the Azure Provider 2.0.0. I have the following block to retrieve all subscriptions starting with “sub-”:
data "azurerm_subscriptions" "mgt" {
display_name_prefix = "sub-"
}
Now I would like to somehow automatically create the different “azurerm_subscription” objects from this one. Is there any way to kind of loop over all those subscriptions and create the appropriate “azurerm_subscription” objects?
Thanks!
display_name_prefix
is not expected indata "azurerm_subscription"
block, what do you try to do? Also, you can use this data source to access information about an existing Subscription. You can not create new subscription objects from it. – Nancy Xiongdata "azurerm_subscriptions"
output all the filtered subscriptions. It's a list not a string of subscription. So is this your problem? – Nancy Xiongfor_each
through a pre-defined list of subscriptions, but not through a list populated by running Terraform. terraform.io/docs/configuration/… – logicaldiagram