Starting with output variables

I am using Azure and I have started to use the play with output variables in-order to reuse code.

I have run into the following error when I perform a terraform apply

“Error: Unsupported attribute
on line 2, in output “azurerm_resource_group”:
2: value = “${}”
This value does not have any attributes”

Within the file I have the following block:

resource “azurerm_resource_group” “demotest” {
name = “rg001”
location = “uksouth”

When I refer to the terraform online docs I can see that azurerm_resource_group has an attribute called id (
Therefore I am unsure why I get the error above. I get a similar error when I use the following block within the for my network module. Again the guid attribute is listed on the terraform online docs.

output “virtual_networkconfiguration_id” {
value = “${}”

The goal is to work on outputs so that I can play with re-using code through the use of modules within Azure

The id attribute is an attribute of the resource, not of the resource’s name attribute.

Use instead of