-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.tf
48 lines (37 loc) · 1.14 KB
/
main.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
terraform {
required_version = ">= 0.12"
required_providers {
azurerm = ">= 2.2"
}
}
###################
# Virtual Wan
###################
resource "azurerm_virtual_wan" "vwan" {
name = var.wanname
resource_group_name = var.rsg
location = var.location
tags = {
BuildBy = var.tag_buildby
BuildDate = var.tag_builddate
BuildTicket = var.tag_buildticket
Environment = var.environment
}
}
###################
# Virtual Hub
###################
resource "azurerm_virtual_hub" "vhub" {
count = length(var.hubnames)
name = var.hubnames[count.index]
resource_group_name = var.rsg
address_prefix = var.adress_prefixes[count.index]
location = var.hublocations[count.index]
virtual_wan_id = azurerm_virtual_wan.vwan.id
tags = {
BuildBy = var.tag_buildby
BuildDate = var.tag_builddate
BuildTicket = var.tag_buildticket
Environment = var.environment
}
}