terraform fmt

This commit is contained in:
MichaelFisher1997 2025-04-18 10:51:00 +01:00
parent 96f6d94c3a
commit 73dd2e18ff
3 changed files with 43 additions and 1 deletions

View File

@ -15,3 +15,18 @@ resource "local_file" "cloud_init_global" {
filename = "${path.module}/files/cloud_init_global.yaml"
}
#resource "null_resource" "upload_cloud_init_alpaca" {
# count = var.alpaca_vm_count
#
# connection {
# type = "ssh"
# user = "root"
# private_key = var.ssh_key
# host = var.target_node
# }
#
# provisioner "file" {
# source = local_file.cloud_init_alpaca[count.index].filename
# destination = "/var/lib/vz/snippets/cloud_init_alpaca_${count.index + 1}.yaml"
# }
#}

View File

@ -1,5 +1,30 @@
#cloud-config
hostname: ${hostname}
package_update: true
package_upgrade: true
# APT fails to acquire GPG keys if package dirmngr is missing
bootcmd:
- [ cloud-init-per, once, dirmngr-aptupdate, apt-get, update ]
- [ cloud-init-per, once, dirmngr-aptinstall, apt-get, install, dirmngr, -y ]
- [ cloud-init-per, once, dirmngr-aptinstall, apt-get, install, gnupg2, -y ]
packages:
- jq
- curl
- qemu-guest-agent
- salt-minion
users:
- name: stuart
groups: sudo
shell: /bin/bash
sudo: ['ALL=(ALL) NOPASSWD:ALL']
ssh_authorized_keys:
- ${ssh_key}
preserve_hostname: false
manage_etc_hosts: false
fqdn: ${hostname}.${domain}
#cloud-config

View File

@ -21,6 +21,7 @@ resource "proxmox_vm_qemu" "alpacas" {
target_node = var.target_node
clone = var.clone_template
full_clone = true
os_type = "cloud-init"
agent = 1
sockets = var.sockets
@ -63,6 +64,7 @@ resource "proxmox_vm_qemu" "llamas" {
target_node = var.target_node
clone = var.clone_template
full_clone = true
os_type = "cloud-init"
agent = 1
sockets = var.sockets