Use this data source to access the properties of an Azure resource group.
data "azurerm_resource_group" "test" {
name = "dsrg_test"
}
resource "azurerm_managed_disk" "test" {
name = "managed_disk_name"
location = "${data.azurerm_resource_group.test.location}"
resource_group_name = "${data.azurerm_resource_group.test.name}"
storage_account_type = "Standard_LRS"
create_option = "Empty"
disk_size_gb = "1"
}
name - (Required) Specifies the name of the resource group. NOTE: If the specified location doesn't match the actual resource group location, an error message with the actual location value will be shown.
location - The location of the resource group. tags - A mapping of tags assigned to the resource group.
© 2018 HashiCorpLicensed under the MPL 2.0 License.
https://www.terraform.io/docs/providers/azurerm/d/resource_group.html