Adding basic exemples for terraform infrastructure

This commit is contained in:
Philippe Caseiro 2021-03-23 11:33:27 +01:00
parent f1eb29b0ad
commit 3c69897bc0
4 changed files with 103 additions and 0 deletions

View File

@ -0,0 +1,12 @@
one_endpoint = "https://myhapy.fabrica.local/RPC2"
one_user = "terra"
one_pass = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
one_vswitch = "vswitch"
one_prod_ds = "101"
image_builder_ip = "192.168.1.108"
dns_server = "192.168.5.53"
dns_domain = "fabrica.local."
cluster_id = 0
dns_key_name = "terraform.key."
dns_key_secret = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"

View File

@ -0,0 +1,22 @@
dns_zones = [
{
domain = "cadoles.com",
a_records = {
hapy = [ "192.168.1.108" ],
amon = [ "192.168.1.1"]
},
cname_records = {
hapy = "virt.cadoles.com."
}
},
{
domain = "cadol.es",
a_records = {
hapy = [ "192.168.1.108" ],
amon = [ "192.168.1.1"]
},
cname_records = {
hapy = "virt.cadol.es."
}
}
]

View File

@ -0,0 +1,24 @@
virtual_networks = {
internet = {
vlan_id = "4",
adress_range = {
ar_type = "IP4",
size = "10",
ip4 = "192.168.1.28"
},
dns = "192.168.5.53",
gateway = "192.168.1.1",
clusters = [ "0" ]
},
office = {
vlan_id = "10",
adress_range = {
ar_type = "IP4",
size = "30",
ip4 = "192.168.10.100"
},
dns = "192.168.5.53",
gateway = "192.168.10.254",
clusters = [ "0" ]
}
}

View File

@ -0,0 +1,45 @@
virtual_machines = {
amon = {
fqdn = "amon.fabrica.local",
domain = "fabrica.local",
create_dns_a_record = "no",
cpu = "0.4",
vcpu = "4",
memory = "4096",
network_interfaces = [
{ network_name = "internet", ip = "192.168.1.3" },
{ network_name = "office", ip = "192.168.10.254" }
],
labels = "Production, Amon, Infra, Backup, EOLE",
disks = {
system = {
name = "prod-amon-static",
source = "http://localhost/fabrica/infra/production/amon.fabrica.local/system/amon.fabrica.local.img"
}
}
depends = [ "internet" ]
},
scribe = {
fqdn = "scribe.fabrica.local",
domain = "fabrica.local",
create_dns_a_record = "no",
cpu = "0.4",
vcpu = "4",
memory = "4096",
network_interfaces = [
{ network_name = "office", ip = "192.168.10.200" }
],
labels = "Production, Scribe, Infra, Backup, EOLE",
disks = {
system = {
name = "prod-scribe-static",
source = "http://localhost/fabrica/infra/production/scribe.fabrica.local/system/scribe.fabrica.local.img"
}
}
depends = [ "internet" ]
}
}