-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.tf
101 lines (83 loc) · 1.73 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
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
terraform {
required_providers {
#
# Netbox
#
# Docs: https://registry.terraform.io/providers/e-breuninger/netbox/latest/docs
#
netbox = {
source = "e-breuninger/netbox"
version = "0.2.4"
}
#
# Netbox IPAM
#
# Docs: https://registry.terraform.io/providers/tle06/netbox/latest/docs
#
ipam = {
source = "smutel/netbox"
version = "2.0.2"
}
#
# Netbox Orgs and Tenants
#
# Docs: https://registry.terraform.io/providers/tpretz/netbox/latest/docs
#
netboxorgs = {
source = "tpretz/netbox"
version = "2.5.1"
}
#
# Netbox Regions
#
# Docs: https://registry.terraform.io/providers/tle06/netbox/latest/docs
#
netboxregions = {
source = "tle06/netbox"
version = "0.1.0-alpha.7"
}
}
}
module "Vault" {
source = "./Vault"
}
provider "netbox" {
server_url = "http://netbox-http-cont.service.kjdev:8080"
api_token = module.Vault.Netbox.Token
}
provider "ipam" {
url = "netbox-http-cont.service.kjdev:8080"
scheme = "http"
#
# Auth
#
token = module.Vault.Netbox.Token
}
provider "netboxorgs" {
server_url = "http://netbox-http-cont.service.kjdev:8080"
app_id = module.Vault.Netbox.Token
}
provider "netboxregions" {
host = "http://netbox-http-cont.service.kjdev:8080"
token = module.Vault.Netbox.Token
}
#
# TODO: Temp Office Sandbox till I move to templates
#
module "Region" {
source = "./Region"
Name = "TestRegion"
Slug = "YWG"
providers = {
netboxregions.regions = netboxregions
}
}
module "TMPOffice" {
source = "./Office"
Name = "TestHome1"
Region = module.Region.Region
providers = {
ipam.ipam = ipam
sites.sites = netboxregions
}
}