mirror of
https://gitea.fenix-dev.com/fenix-gitea-admin/iac-opentofu-private.git
synced 2025-10-27 15:53:06 +00:00
Compare commits
4 Commits
827bac16cb
...
697189577d
| Author | SHA1 | Date | |
|---|---|---|---|
| 697189577d | |||
| cc441d8ad8 | |||
| 634ebaff29 | |||
| e71295794f |
25
proxmox.tf
25
proxmox.tf
@ -192,28 +192,3 @@ resource "proxmox_virtual_environment_vm" "k8s_vms" {
|
||||
enabled = true
|
||||
}
|
||||
}
|
||||
|
||||
resource "null_resource" "add_api_ip" {
|
||||
for_each = {
|
||||
for vm in var.proxmox_k8s_vms : vm.name => vm
|
||||
}
|
||||
|
||||
triggers = {
|
||||
vm_id = each.value.vm_id
|
||||
}
|
||||
|
||||
provisioner "remote-exec" {
|
||||
inline = [
|
||||
"sudo ip addr add ${each.value.ip3} dev eth0"
|
||||
]
|
||||
|
||||
connection {
|
||||
type = "ssh"
|
||||
host = split("/", each.value.ip)[0] // remove a máscara para conectar
|
||||
user = each.value.extra_users[0].name
|
||||
password = each.value.extra_users[0].password
|
||||
timeout = "4m"
|
||||
agent = false
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user