Reputation: 65
I am building terraform module and using many places existing resource group and storage account. Is there any way to import storage account details, while importing resource group only. otherwsie I have to repeat the mentioned code in all modules.
or anyway like ```data "azurerm_resource_group" "name"{Access storage account}"```
data "azurerm_resource_group" "name" {
name = "rgroup"
}
data "azurerm_storage_account" "staccount" {
name = "stg"
resource_group_name = "rgroup"
}
Upvotes: 0
Views: 297
Reputation: 3372
No there is not a way to do that. You could make your own module that does that and reuse that one module to return the output you need.
Upvotes: 1