How to output name of a resource from module in terraform
I have been trying to figure out how to output the "name" parameter of a resource in Terraform so I can then use this in other modules. This is my best attempt so far: resource "azurerm_resource_group" "rg_infrastructure" { name = "rg_${var.environment}_Infrastructure" location = var.location } output "rg_infrastructureName" { value = module.rg_infrastructure.name # <- How to… Read More How to output name of a resource from module in terraform