Course outlines for learning terraform.
MyRg
.main.tf
:resource "azurerm_resource_group" "mine" {
# (resource arguments)
}
Run terraform import azurerm_resource_group.mine /subscriptions/1234abcd-12ab-23bc-34cd-abcdef112345/resourceGroups/MyRg
. The subscription can be obtained from the Azure Portal.
Run terraform show
to see the results:
# azurerm_resource_group.mine:
resource "azurerm_resource_group" "mine" {
id = "/subscriptions/c29870c1-9aff-4ac7-b431-a2f61e603891/resourceGroups/MyRg"
location = "eastus"
name = "MyRg"
tags = {}
timeouts {}
}
main.tf
.