ansible-debops-infrastructure

DebOps and Ansible scripts to manage my infrastructure
git clone git://git.erethon.com/ansible-debops-infrastructure
Log | Files | Refs

commit 2206358cc63d03acdb54d9e6579f4ed3d30068fd
parent fd2588eb1a585c526afb0d8eab5ad3509131d414
Author: Dionysis Grigoropoulos <dgrig@erethon.com>
Date:   Sat,  4 May 2019 03:18:12 +0300

tf: Create debian prometheus host on prod

Diffstat:
terraform/infrastructure/prod/main.tf | 32++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+), 0 deletions(-)

diff --git a/terraform/infrastructure/prod/main.tf b/terraform/infrastructure/prod/main.tf @@ -10,6 +10,13 @@ resource "libvirt_network" "production_network" { bridge = "virbr2" } +resource "libvirt_volume" "debian_prometheus_disk" { + name = "debian_prometheus_disk" + pool = "${var.libvirt_storage_pool}" + format = "qcow2" + size = 10737418240 +} + resource "libvirt_volume" "debian_container_disk" { name = "debian_container" pool = "${var.libvirt_storage_pool}" @@ -24,6 +31,31 @@ resource "libvirt_volume" "debian_matrix_disk" { size = 21474836480 } +resource "libvirt_domain" "debian_prometheus_domain" { + name = "debian_prometheus" + memory = "1024" + vcpu = 2 + autostart = "true" + + boot_device { + dev = ["hd"] + } + + disk { + volume_id = "${libvirt_volume.debian_prometheus_disk.id}" + } + + network_interface { + network_id = "${libvirt_network.production_network.id}" + addresses = ["192.168.198.3"] + } + + graphics { + type = "spice" + listen_type = "none" + } +} + resource "libvirt_domain" "debian_container_domain" { name = "debian_container" memory = "1024"