output name and id to file

This commit is contained in:
2025-10-18 20:29:22 +00:00
parent ef8ad56273
commit b3afe77bc0
2 changed files with 12 additions and 2 deletions

View File

@@ -5,6 +5,9 @@ terraform {
proxmox = {
source = "telmate/proxmox"
}
ansible = {
source = "ansible/ansible"
}
}
}

View File

@@ -24,3 +24,10 @@ resource "proxmox_lxc" "basic" {
ip = "dhcp"
}
}
resource "local_file" "Ans_inv" {
content = <<-DOC
hostname: ${proxmox_lxc.basic.hostname}
id: ${proxmox_lxc.basic.id}
DOC
filename = "${path.module}/output.txt"
}