Updated terraform configurations

This commit is contained in:
git
2026-04-20 22:23:20 +10:00
parent b6d2e4ee62
commit b422a55c02
19 changed files with 845 additions and 66 deletions
+48 -11
View File
@@ -1,14 +1,51 @@
# Proxmox scaffold only.
# Proxmox import-first workflow
#
# 1) Add one minimal resource block for one existing VM.
# 2) Add an import block for that VM using the provider's required import ID format.
# 3) Run:
# terraform init
# terraform plan
# or:
# ../scripts/reconcile_from_plan.sh -- -var-file=terraform.tfvars
# 4) Review generated config carefully.
# 5) Move only the useful arguments into a hand-maintained .tf file.
# 6) Repeat until `terraform plan` is a no-op.
# IMPORTANT:
# - Resource blocks are intentionally omitted for now.
# - Before adding resources, confirm:
# 1) provider resource schemas,
# 2) exact import ID formats,
# 3) non-destructive reconciliation strategy for existing VMs.
# - Start with exactly ONE existing VM.
# - Do not apply until plan is clean.
# - Confirm the provider's exact import ID format before running import/plan.
# - Do not import your whole environment at once.
# Example placeholder for one existing VM
#resource "proxmox_virtual_environment_vm" "server-nixos" {
# name = "server-nixos"
# node_name = "pve"
#}
# Example import block
# REPLACE the id below with the exact import ID format required by your provider.
# This is provider-specific and must be confirmed before use.
#
# Suggested future workflow mirrors docker/:
# - Define one resource for an existing object.
# - Import it.
# - Use `terraform state show` to reconcile config.
# - Proceed incrementally.
# Commonly this will involve the Proxmox node name and VM ID in some form.
#
import {
to = proxmox_virtual_environment_vm.nix-cache
id = "pve/105"
}
import {
to = proxmox_virtual_environment_vm.server-nixos
id = "pve/104"
}
import {
to = proxmox_virtual_environment_vm.pihole
id = "pve/108"
}
import {
to = proxmox_virtual_environment_vm.pbs
id = "pve/106"
}
import {
to = proxmox_virtual_environment_vm.docker
id = "pve/103"
}