Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- terraform {
- required_providers {
- proxmox = {
- source = "Telmate/proxmox"
- version = ">=2.0.0"
- }
- }
- backend "s3" {
- bucket = "infr-state"
- key = "terraform.tfstate"
- encrypt = true
- dynamodb_table = "infra-state-lock"
- }
- }
- provider "proxmox" {
- pm_user = var.pm_user
- pm_password = var.pm_password
- pm_api_url = var.pm_api_url
- pm_tls_insecure = true
- }
- resource "proxmox_vm_qemu" "vm" {
- count = 1
- name = "vm-${count.index}"
- target_node = "node-0"
- clone = "debian-10-cloudinit"
- os_type = "cloud-init"
- cores = 4
- sockets = "1"
- cpu = "host"
- memory = 4096
- scsihw = "virtio-scsi-pci"
- bootdisk = "scsi0"
- disk {
- size = "150G"
- type = "scsi"
- storage = "local-lvm"
- iothread = true
- }
- network {
- model = "virtio"
- bridge = "vmbr0"
- }
- lifecycle {
- ignore_changes = [
- network
- ]
- }
- ipconfig0 = "ip=192.168.88.110/24,gw=192.168.88.1"
- sshkeys = <<EOF
- ${var.template_ssh_key}
- EOF
- }
Add Comment
Please, Sign In to add comment