back
terraform {
required_providers {
azurerm = ">= 2.54.0"
}
}
top
module "azurerm_virtual_hub" {
source = "./modules/azurerm/d/azurerm_virtual_hub"
# name - (required) is a type of string
name = null
# resource_group_name - (required) is a type of string
resource_group_name = null
timeouts = [{
read = null
}]
}
top
variable "name" {
description = "(required)"
type = string
}
variable "resource_group_name" {
description = "(required)"
type = string
}
variable "timeouts" {
description = "nested block: NestingSingle, min items: 0, max items: 0"
type = set(object(
{
read = string
}
))
default = []
}
top
data "azurerm_virtual_hub" "this" {
# name - (required) is a type of string
name = var.name
# resource_group_name - (required) is a type of string
resource_group_name = var.resource_group_name
dynamic "timeouts" {
for_each = var.timeouts
content {
# read - (optional) is a type of string
read = timeouts.value["read"]
}
}
}
top
output "address_prefix" {
description = "returns a string"
value = data.azurerm_virtual_hub.this.address_prefix
}
output "id" {
description = "returns a string"
value = data.azurerm_virtual_hub.this.id
}
output "location" {
description = "returns a string"
value = data.azurerm_virtual_hub.this.location
}
output "tags" {
description = "returns a map of string"
value = data.azurerm_virtual_hub.this.tags
}
output "virtual_wan_id" {
description = "returns a string"
value = data.azurerm_virtual_hub.this.virtual_wan_id
}
output "this" {
value = azurerm_virtual_hub.this
}
top