terraform: fmt normalization + deprecated resource rename + commit lockfile

Ran `terraform init && terraform validate && terraform fmt` after
installing terraform 1.9.8 locally (which the initial commit couldn't
do since terraform wasn't on the authoring host).

Changes:
  - fmt: alignment normalization on image.tf, store_vm.tf, bmpgen_vm.tf,
    outputs.tf.
  - proxmox_virtual_environment_download_file -> proxmox_download_file
    (deprecated in bpg/proxmox v0.111.1, removed in v1.0).
  - .terraform.lock.hcl: unignored + committed. Pins bpg/proxmox to
    v0.111.1 and hashicorp/random to v3.9.0 so contributors get the same
    provider set on `terraform init`.

`terraform validate` is now Success, no warnings.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
sam 2026-07-20 18:33:39 -07:00
parent d30ec2074a
commit 33f9f4daf7
6 changed files with 77 additions and 32 deletions

6
.gitignore vendored
View File

@ -1,7 +1,7 @@
# Terraform state -- has infra addresses and (with older providers) can leak # Terraform provider binaries + state.
# secrets if written unencrypted. Never commit. # .terraform.lock.hcl (dependency lock file) IS committed per HashiCorp
# best practice -- it pins provider versions across contributors.
terraform/.terraform/ terraform/.terraform/
terraform/.terraform.lock.hcl
terraform/*.tfstate terraform/*.tfstate
terraform/*.tfstate.* terraform/*.tfstate.*
terraform/*.tfstate.backup terraform/*.tfstate.backup

45
terraform/.terraform.lock.hcl generated Normal file
View File

@ -0,0 +1,45 @@
# This file is maintained automatically by "terraform init".
# Manual edits may be lost in future updates.
provider "registry.terraform.io/bpg/proxmox" {
version = "0.111.1"
constraints = "~> 0.60"
hashes = [
"h1:ML2D3UUZTM99yrll/EBXj7wBYMb8xmQgomqFNybEoxY=",
"zh:18fb7c31a08dde6bffa1a4d4a211e604d6d17eec7092fd59331b3db3c6f3742c",
"zh:1cd60761538289d4dd2a1086b3ae62a7b0bdd4b1a2f824e9a44e243413168dba",
"zh:2eb76f6fc8299b6820ff678c8252332cc3366e226b5ae2e61748fd2449c1ed92",
"zh:45e6f7ebd0bf48911d37060359a4f359b5743b3092e985295733990e406d0416",
"zh:4aa8ba912eae37975d2e983394d173e595ca34fc76b5bf220b37d0e99d76e98c",
"zh:58e0789923103a77d502a0a9fc3eb920625e8eb935ec2d4ac0d006aebd1d186c",
"zh:6df8aa85fb8865915537e946c19b02538ad188018a629759c213c6f03730f642",
"zh:6ed47bc00d0913a1d0880618fa1376115e9edab6b4a658c081061a7f0e4ca360",
"zh:c5b10ff4f33df7e4c29e8f1127d49845b561b37b57517e844fb0954d7923d65e",
"zh:d016510e14b738499f0db9d9b3aafe82fc6877fb4ab4e9f831fb68a8d70a1385",
"zh:d941f394069bbf24351b363da1c64383f487067aaee0a84f9b96476d4912e212",
"zh:ddf271dbc2632ae8ffa8de3972f243ee47d260cb2ac90aa784f2746d98e21a0f",
"zh:ed0caa3501c42f611b7e9622c9b1df69fd85dc25a3cd88d3076381829688cd62",
"zh:f26e0763dbe6a6b2195c94b44696f2110f7f55433dc142839be16b9697fa5597",
]
}
provider "registry.terraform.io/hashicorp/random" {
version = "3.9.0"
constraints = "~> 3.6"
hashes = [
"h1:UlBuNVuCGJ39tTv2c5gz2NRZnQbXfbIWbTzWcth5o74=",
"zh:161ad0bd9a75768c82f53fb6e7172a9d8be2d4889b012645a34795031aaf1bf1",
"zh:19dc9a5b17729725ccfc4f45b0500af0ee5bc6b6b160c7adb8f2bf617d2c80ea",
"zh:269eda8fe42daa7974d5a34d166c3ba9defe80cde86c01e4dadcfdf2e1f05e5f",
"zh:373f7c65566f8f2cc7f45d698654feb9d988996957e1266a69ca00c52d6d16d0",
"zh:5599d16804c41c83009ec621b6d6b6f74e102f5827678a4750f8809055546b61",
"zh:583be0440469a22bff70dcfa56593b01566860b29607437264adb51060cf46fc",
"zh:5f211d8ec3f2e1f414870d9584bfe26e6995560ef81c748f8447a48164767398",
"zh:78d5eefdd9e494defcb3c68d282b8f96630502cac21d1ea161f53cfe9bb483b3",
"zh:7b547fd16216761ef86efc3ed516ac5ac0c5c42b7c7eb24a08cef2d93f69ed5e",
"zh:7e7c0679daf2a382151d05068c8c3f0dae6b7b7dccf818827b73dd08638df2ef",
"zh:8089dec888a8038b9b4fb23b3df7e1057293dbc5b60b42cc47ff690d69d4b61b",
"zh:c51f15a031edfd6f23ce8ced3446ca7f8d8d647e2499890d7d5d10d5016d7257",
"zh:c94784f005708890dc6895afd53636ec00ec1e430b15d41e5aebfb1d4b39bd04",
]
}

View File

@ -55,7 +55,7 @@ resource "proxmox_virtual_environment_vm" "bmpgen" {
disk { disk {
datastore_id = var.vm_storage_pool datastore_id = var.vm_storage_pool
file_id = proxmox_virtual_environment_download_file.ubuntu_noble.id file_id = proxmox_download_file.ubuntu_noble.id
interface = "scsi0" interface = "scsi0"
size = 16 size = 16
ssd = true ssd = true

View File

@ -1,6 +1,6 @@
# One-time Ubuntu cloud image download. bpg/proxmox handles the "did I # One-time Ubuntu cloud image download. bpg/proxmox handles the "did I
# already download this?" check by URL + storage; safe to re-run. # already download this?" check by URL + storage; safe to re-run.
resource "proxmox_virtual_environment_download_file" "ubuntu_noble" { resource "proxmox_download_file" "ubuntu_noble" {
content_type = "iso" content_type = "iso"
datastore_id = var.image_storage datastore_id = var.image_storage
node_name = var.pve_node node_name = var.pve_node

View File

@ -54,7 +54,7 @@ resource "proxmox_virtual_environment_vm" "store" {
disk { disk {
datastore_id = var.vm_storage_pool datastore_id = var.vm_storage_pool
file_id = proxmox_virtual_environment_download_file.ubuntu_noble.id file_id = proxmox_download_file.ubuntu_noble.id
interface = "scsi0" interface = "scsi0"
size = var.vm_disk_gb size = var.vm_disk_gb
ssd = true ssd = true