FK
Size: a a a
FK
FK
FK
FK
$ cat main.tf.pub
provider "proxmox" {
pm_user = ""
pm_password = ""
pm_api_url = "https://:8006/api2/json"
}
resource "proxmox_vm_qemu" "test" {
name = "mirror.rd"
desc = "Centos and EPEL Mirror"
target_node = "pve01"
#force_create = true
clone = "terraform-centos-template"
storage = "pve-data-lvm"
cores = 2
sockets = 1
memory = 4096
disk_gb = 1000
nic = "virtio"
bridge = "vmbr1"
ssh_forward_ip = "x.x.x.x"
ssh_user = "xxx"
ssh_private_key = <<EOF
-----BEGIN RSA PRIVATE KEY-----
-----END RSA PRIVATE KEY-----
EOF
os_type = "centos"
os_network_config = <<EOF
auto eth0
iface eth0 inet dhcp
EOF
provisioner "remote-exec" {
inline = [
"/usr/sbin/ip a"
]
}
provisioner "proxmox" {
action = "sshbackward"
}
}
FK
MM
$ cat main.tf.pub
provider "proxmox" {
pm_user = ""
pm_password = ""
pm_api_url = "https://:8006/api2/json"
}
resource "proxmox_vm_qemu" "test" {
name = "mirror.rd"
desc = "Centos and EPEL Mirror"
target_node = "pve01"
#force_create = true
clone = "terraform-centos-template"
storage = "pve-data-lvm"
cores = 2
sockets = 1
memory = 4096
disk_gb = 1000
nic = "virtio"
bridge = "vmbr1"
ssh_forward_ip = "x.x.x.x"
ssh_user = "xxx"
ssh_private_key = <<EOF
-----BEGIN RSA PRIVATE KEY-----
-----END RSA PRIVATE KEY-----
EOF
os_type = "centos"
os_network_config = <<EOF
auto eth0
iface eth0 inet dhcp
EOF
provisioner "remote-exec" {
inline = [
"/usr/sbin/ip a"
]
}
provisioner "proxmox" {
action = "sshbackward"
}
}
FK
FK
FK
FK
FK
FK
FK
FK
FK
FK
MM
disk - (Optional)
id (Required)
type (Required)
storage (Required)
storage_type (Optional; defaults to dir) One of PVE types as described in their documentation.
size (Required)
MM
FK
FK