-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathexample.tf
101 lines (81 loc) · 2.27 KB
/
example.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
provider "azurerm" {
features {}
}
module "resource_group" {
source = "clouddrove/resource-group/azure"
version = "1.0.2"
name = "app-lb"
environment = "test"
label_order = ["name", "environment"]
location = "Canada Central"
}
module "vnet" {
source = "clouddrove/vnet/azure"
version = "1.0.4"
name = "app"
environment = "test"
resource_group_name = module.resource_group.resource_group_name
location = module.resource_group.resource_group_location
address_spaces = ["10.0.0.0/16"]
}
module "subnet" {
source = "clouddrove/subnet/azure"
version = "1.2.1"
name = "app"
environment = "test"
resource_group_name = module.resource_group.resource_group_name
location = module.resource_group.resource_group_location
virtual_network_name = module.vnet.vnet_name
#subnet
subnet_names = ["subnet1"]
subnet_prefixes = ["10.0.1.0/24"]
# route_table
enable_route_table = true
route_table_name = "default_subnet"
routes = [
{
name = "rt-test"
address_prefix = "0.0.0.0/0"
next_hop_type = "Internet"
}
]
}
module "load-balancer" {
source = "../"
# Labels
name = "app"
environment = "test"
# Common
enabled = true
resource_group_name = module.resource_group.resource_group_name
location = module.resource_group.resource_group_location
# Load Balancer
frontend_name = "mypublicIP"
frontend_private_ip_address_allocation = "static"
frontend_private_ip_address = "10.0.1.6"
lb_sku = "Standard"
# Public IP
ip_count = 1
allocation_method = "static"
sku = "Standard"
nat_protocol = "Tcp"
public_ip_enabled = true
ip_version = "IPv4"
# Backend Pool
is_enable_backend_pool = false
# network_interaface_id_association = ""
# ip_configuration_name_association = ""
remote_port = {
ssh = ["Tcp", "22"]
https = ["Tcp", "80"]
}
lb_port = {
http = ["80", "Tcp", "80"]
https = ["443", "Tcp", "443"]
}
lb_probe = {
http = ["Tcp", "80", ""]
http2 = ["Http", "1443", "/"]
}
depends_on = [module.resource_group]
}