feat(tofu): OpenTofu provisioning scaffold, auth modes and pilot notes
- providers.tf / variables.tf / versions.tf: bpg/proxmox ~> 0.84, endpoint and credentials from TF_VAR_* (set by the Makefile tofu-* targets from the repo-root .env). Two auth modes: root@pam by password (privileged: features beyond nesting, device passthrough, datastore mount points) or the ansible@pve token. - README.md: pilot results on VMID 199 - what the token can and cannot do, why a root token still fails the literal `$authuser eq 'root@pam'` check, the cmode/console drift finding, and the chosen root@pam-by-password mode. - pilot.tf.example: reference resource shape (features, device_passthrough, mount_point), not loaded (.example). - .terraform.lock.hcl: pin the provider. State has no backend yet; tofu/*.tfstate stays local and git-ignored. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012uoq5AVK8mkBgg83Mq6o5V
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
e0c53a1b1b
commit
646f2bbc8f
@@ -0,0 +1,42 @@
|
||||
# Значения приходят из корневого .env через Make (цели tofu-* в ansible/Makefile),
|
||||
# который перекладывает PROXMOX_* в TF_VAR_*. Отдельного файла с секретами нет.
|
||||
|
||||
variable "pve_endpoint" {
|
||||
description = "URL Proxmox API. Цели tofu-* направляют его в локальный конец SSH-туннеля."
|
||||
type = string
|
||||
}
|
||||
|
||||
# --- Аутентификация ---------------------------------------------------------
|
||||
# Ровно один из двух способов, выбор делает Makefile:
|
||||
#
|
||||
# токен ansible@pve — обычный режим. Не может features кроме nesting,
|
||||
# device passthrough и bind mount каталога хоста.
|
||||
# root@pam + пароль — привилегированный режим. Проверка в Proxmox буквальная
|
||||
# (`$authuser eq 'root@pam'`), поэтому токен, даже
|
||||
# принадлежащий root, её не проходит — нужен именно пароль.
|
||||
|
||||
variable "pve_api_token" {
|
||||
description = "Токен в формате user@realm!tokenid=secret. Пустая строка — не использовать."
|
||||
type = string
|
||||
sensitive = true
|
||||
default = ""
|
||||
}
|
||||
|
||||
variable "pve_username" {
|
||||
description = "Пользователь для парольной аутентификации, обычно root@pam. Пустая строка — не использовать."
|
||||
type = string
|
||||
default = ""
|
||||
}
|
||||
|
||||
variable "pve_password" {
|
||||
description = "Пароль root@pam. Пустая строка — не использовать."
|
||||
type = string
|
||||
sensitive = true
|
||||
default = ""
|
||||
}
|
||||
|
||||
variable "pve_insecure" {
|
||||
description = "Не проверять TLS-сертификат Proxmox"
|
||||
type = bool
|
||||
default = true
|
||||
}
|
||||
Reference in New Issue
Block a user