## provider "proxmox" { # description de la connexion au serveur proxmox # pm_tls_insecure = true # pm_api_url = "https://pxlab1.sio.lan:8006/api2/json" # pm_user = "root@pam" # pm_password = "Azerty1+" #} resource "proxmox_vm_qemu" "s-infra" { name = "s-infra" os_type = "cloudinit" desc = "Serveur s-infra" target_node = "pxlab1" # la machine Proxmox cible clone = "Debian-11.5-Template" # le nom de la template a cloner cores = 1 sockets = 1 memory = 1024 ipconfig0 = "ip=192.168.99.2/24,gw=192.168.99.99" # ou bien ip=dhcp ipconfig1 = "ip=172.16.1.2/24" # ou bien ip=dhcp ssh_user = "debian" # le compte SSH de connexion par défaut sshkeys = <<-EOT ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDd97G/Uw3zlnhVByjpHZFw9FDa88phFUMtYfstTq7wYlUOJB2rdLPpU0bAjIpvpYmHOmBNseWYKaOT7EXNdxWPWJGuoen23tqdSzhnOV0LJz8zbCIA0Ykz/XOqRyJkq6qUw+L3atDxVC5pSSSY279yJtuQ2nmVld2KWDY4lnyZzZT5eQsrxCbT57hVMLCKcMKNb4QnYlLgnyHW8DyWHGG5GEWF9skFSPlmwY5s5H3OYg3u8ijuGjenjDTzLfRUzFltGJ2kBYbIn1iailArKpCiasmJyyja+YuYn3WwaNcl8Tpqa8eI52/LtOXDMwUKzvRJ6D6INEr/1duGYP/fQSEH root@ansible EOT network { model = "virtio" bridge = "vmbr1" # reseau -n-adm } network { model = "virtio" bridge = "vmbr2" # reseau infra } disk { type = "scsi" storage = "local-lvm" # storage_type = "qcow2" size = "6G" format = "raw" } }