aboutsummaryrefslogtreecommitdiffstats
path: root/opentofu/main.tf
diff options
context:
space:
mode:
authorclyhtsuriva <aimeric@adjutor.xyz>2026-06-25 19:41:56 +0200
committerclyhtsuriva <aimeric@adjutor.xyz>2026-06-25 19:41:56 +0200
commite35b6d8d3859b5e5960ce49c1438aa5af2911433 (patch)
tree659bc3c9a89cbc68a0878f8901fc5835f24bb39c /opentofu/main.tf
parent30c9dd5a2450011a04fb426b9b81b60989d1ce2f (diff)
downloadhomelab-iac-e35b6d8d3859b5e5960ce49c1438aa5af2911433.tar.gz
homelab-iac-e35b6d8d3859b5e5960ce49c1438aa5af2911433.tar.bz2
homelab-iac-e35b6d8d3859b5e5960ce49c1438aa5af2911433.zip
opentofu: starting to experiment with openstack
Diffstat (limited to 'opentofu/main.tf')
-rw-r--r--opentofu/main.tf46
1 files changed, 43 insertions, 3 deletions
diff --git a/opentofu/main.tf b/opentofu/main.tf
index 95ff76b..deedfd4 100644
--- a/opentofu/main.tf
+++ b/opentofu/main.tf
@@ -39,7 +39,8 @@ resource "proxmox_virtual_environment_vm" "docker_server" {
initialization {
ip_config {
ipv4 {
- address = "192.168.1.150/24,gw=192.168.1.1"
+ address = "192.168.1.150/24"
+ gateway = "192.168.1.1"
}
}
@@ -94,7 +95,8 @@ resource "proxmox_virtual_environment_vm" "k3s_master" {
initialization {
ip_config {
ipv4 {
- address = "192.168.1.14${count.index}/24,gw=192.168.1.1"
+ address = "192.168.1.14${count.index}/24"
+ gateway = "192.168.1.1"
}
}
@@ -147,7 +149,8 @@ resource "proxmox_virtual_environment_vm" "k3s_worker" {
initialization {
ip_config {
ipv4 {
- address = "192.168.1.13${count.index}/24,gw=192.168.1.1"
+ address = "192.168.1.13${count.index}/24"
+ gateway = "192.168.1.1"
}
}
@@ -157,3 +160,40 @@ resource "proxmox_virtual_environment_vm" "k3s_worker" {
}
}
}
+
+#resource "openstack_networking_floatingip_v2" "vpstest_floatip1" {
+# pool = "Ext-Net"
+#}
+
+#resource "openstack_compute_keypair_v2" "keypair" {
+# name = "tmv-keypair"
+# public_key = var.ssh_public_key
+#}
+#
+#resource "openstack_compute_instance_v2" "debian13-uefi-test" {
+# name = "debian13-uefi-test"
+# image_id = "e9e08190-20ce-49f6-9d72-e76ec22de82e" # Debian 13 UEFI
+# flavor_id = "dc3fe9e7-e374-4ad8-b200-fa3bdf45069f" # d2-2
+# key_pair = "tmv-keypair"
+# user_data = file("./test-add-user-terraform.yaml")
+#
+# security_groups = ["default"]
+#
+# metadata = {
+# tags = "debian,vps,docker"
+# }
+#
+# network {
+# name = "Ext-Net"
+# }
+#}
+
+#data "openstack_networking_port_v2" "vm-port" {
+# device_id = openstack_compute_instance_v2.debian13-uefi-test.id
+# network_id = openstack_compute_instance_v2.debian13-uefi-test.network[0].uuid
+#}
+#
+#resource "openstack_networking_floatingip_associate_v2" "fip_vm" {
+# floating_ip = openstack_networking_floatingip_v2.vpstest_floatip1.address
+# port_id = data.openstack_networking_port_v2.vm-port.id
+#}