diff options
Diffstat (limited to 'tofu/ansible/main.tf')
| -rw-r--r-- | tofu/ansible/main.tf | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/tofu/ansible/main.tf b/tofu/ansible/main.tf new file mode 100644 index 0000000..0bbc448 --- /dev/null +++ b/tofu/ansible/main.tf @@ -0,0 +1,37 @@ +terraform { + required_providers { + incus = { + source = "lxc/incus" + version = "0.3.1" + } + } +} + +provider "incus" { + # Configuration options +} + +resource "incus_instance" "debian" { + name = "webserver1" + project = "lab" + image = "images:debian/12/cloud" + wait_for { + type = "ipv4" + } + provisioner "local-exec" { + command = "./local_script ${self.ipv4_address} ${self.name}" + } +} + +resource "incus_instance" "rocky" { + name = "webserver2" + project = "lab" + image = "images:rockylinux/9/cloud" + wait_for { + type = "ipv4" + } + provisioner "local-exec" { + command = "./local_script ${self.ipv4_address} ${self.name}" + } +} + |
