tf-libvirt/vms/terraform.tfvars
surtur adfdfd3726
net-lab: add hosts and category iteration logic
* add a category variable
* add multiple different hosts and enable specifying base image per vm or
per category
* add comments to explain the code
* rename the project
* rename the base domain
2021-05-13 01:23:46 +02:00

74 lines
2.5 KiB
HCL

# project name
projectname = "net-lab-infra"
# OS image
# sourceimage = "$HOME/.images/CentOS-8-GenericCloud-8.3.2011-20201204.2.x86_64.qcow2"
# sourceimage = "$HOME/.images/Fedora-Cloud-Base-33-1.2.x86_64.qcow2"
sourceimage = "https://download.fedoraproject.org/pub/fedora/linux/releases/33/Cloud/x86_64/images/Fedora-Cloud-Base-33-1.2.x86_64.qcow2"
# the base image is the source image for all VMs created from it
baseimagediskpool = "default"
# domain and network settings
domainname = "local"
networkname = "default" # default==NAT
# host-specific settings
# RAM in bytes
# disk size in bytes (disk size must be greater than source image virtual size)
hosts = {
"h_victim" = {
name = "h_victim",
vcpu = 1,
memory = "768",
diskpool = "default",
disksize = "11000000000",
mac = "00:00:00:13:37:22",
sourceimage = "https://cloud.centos.org/centos/8/x86_64/images/CentOS-8-GenericCloud-8.3.2011-20201204.2.x86_64.qcow2",
category = "host-victim",
},
"h_attacker" = {
name = "h_attacker",
vcpu = 1,
memory = "1024",
diskpool = "default",
disksize = "5370000000",
mac = "00:00:00:13:37:23",
sourceimage = "https://download.fedoraproject.org/pub/fedora/linux/releases/34/Cloud/x86_64/images/Fedora-Cloud-Base-34-1.2.x86_64.qcow2",
category = "host-attacker",
},
"r_edge" = {
name = "r_edge",
vcpu = 1,
memory = "768",
diskpool = "default",
disksize = "4300000000",
mac = "00:00:00:13:37:24",
sourceimage = "https://download.fedoraproject.org/pub/fedora/linux/releases/33/Cloud/x86_64/images/Fedora-Cloud-Base-33-1.2.x86_64.qcow2",
category = "router",
},
"r_upstream" = {
name = "r_upstream",
vcpu = 1,
memory = "768",
diskpool = "default",
disksize = "4300000000",
mac = "00:00:00:13:37:25",
sourceimage = "https://download.fedoraproject.org/pub/fedora/linux/releases/33/Cloud/x86_64/images/Fedora-Cloud-Base-33-1.2.x86_64.qcow2",
category = "router",
},
"h_defender" = {
name = "h_defender",
vcpu = 1,
memory = "1024",
diskpool = "default",
disksize = "5370000000",
mac = "00:00:00:13:37:26",
sourceimage = "https://download.fedoraproject.org/pub/fedora/linux/releases/34/Cloud/x86_64/images/Fedora-Cloud-Base-34-1.2.x86_64.qcow2",
category = "host-defender",
},
}