0
0
mirror of https://github.com/bpg/terraform-provider-proxmox.git synced 2025-08-22 11:28:33 +00:00

chore(example): apply consistency in example/*.tf node_name declarations (#2051)

* chore(example): apply consistency in example/*.tf node_name declarations

Signed-off-by: Shawn M. Hanes <smhanes15@gmail.com>

* chore: reformat .tf files

Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>

---------

Signed-off-by: Shawn M. Hanes <smhanes15@gmail.com>
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
Co-authored-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
This commit is contained in:
Shawn M. Hanes 2025-07-30 20:48:32 -04:00 committed by GitHub
parent ce66bfdc61
commit 757b191376
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 36 additions and 15 deletions

View File

@ -1,9 +1,9 @@
provider "proxmox" {
endpoint = var.virtual_environment_endpoint
endpoint = var.virtual_environment_endpoint
api_token = var.virtual_environment_api_token
insecure = true
insecure = true
ssh {
agent = true
agent = true
username = var.virtual_environment_ssh_username
}
}

View File

@ -42,7 +42,7 @@ resource "proxmox_virtual_environment_container" "example_template" {
node_name = data.proxmox_virtual_environment_nodes.example.names[0]
operating_system {
template_file_id = proxmox_virtual_environment_download_file.release_20250610_ubuntu_24_noble_lxc_img.id
template_file_id = proxmox_virtual_environment_download_file.release_20250701_ubuntu_24_10_lxc_img.id
type = "ubuntu"
}
@ -87,7 +87,7 @@ resource "proxmox_virtual_environment_container" "example" {
pool_id = proxmox_virtual_environment_pool.example.id
# Set the protection flag to prevent the deletion/update operations for the container and its disks.
# protection = true
vm_id = 2043
vm_id = 2043
}
output "resource_proxmox_virtual_environment_container_example_id" {

View File

@ -3,7 +3,7 @@
resource "proxmox_virtual_environment_download_file" "release_20250701_ubuntu_24_10_lxc_img" {
content_type = "vztmpl"
datastore_id = "local"
node_name = var.virtual_environment_node_name
node_name = data.proxmox_virtual_environment_nodes.example.names[0]
url = var.release_20250701_ubuntu_24_10_lxc_img_url
checksum = var.release_20250701_ubuntu_24_10_lxc_img_checksum
checksum_algorithm = "sha256"
@ -15,7 +15,7 @@ resource "proxmox_virtual_environment_download_file" "latest_debian_12_bookworm_
content_type = "import"
datastore_id = "local"
file_name = "debian-12-generic-amd64.qcow2"
node_name = var.virtual_environment_node_name
node_name = data.proxmox_virtual_environment_nodes.example.names[0]
url = var.latest_debian_12_bookworm_qcow2_img_url
overwrite = true
overwrite_unmanaged = true

View File

@ -1,44 +1,65 @@
variable "virtual_environment_endpoint" {
type = string
description = "The endpoint for the Proxmox Virtual Environment API (example: https://host:port)"
type = string
}
variable "virtual_environment_username" {
description = "Proxmox User for API Access"
type = string
default = "root@pam"
}
variable "virtual_environment_password" {
description = "Password for Proxmox API User"
type = string
sensitive = true
default = "don not use default passwords!"
}
variable "virtual_environment_api_token" {
type = string
description = "The API token for the Proxmox Virtual Environment API"
type = string
sensitive = true
}
variable "virtual_environment_ssh_username" {
type = string
description = "The username for the Proxmox Virtual Environment API"
type = string
default = "root"
}
variable "virtual_environment_node_name" {
description = "Name of the Proxmox node"
type = string
default = "pve"
default = "pve"
}
variable "virtual_environment_insecure" {
description = "Self Signed Certificates Used"
type = bool
default = true
}
variable "virtual_environment_storage" {
description = "Name of the Proxmox storage"
type = string
default = "local-lvm"
default = "local-lvm"
}
variable "latest_debian_12_bookworm_qcow2_img_url" {
type = string
description = "The URL for the latest Debian 12 Bookworm qcow2 image"
type = string
default = "https://cloud.debian.org/images/cloud/bookworm/latest/debian-12-generic-amd64.qcow2"
}
variable "release_20250701_ubuntu_24_10_lxc_img_url" {
type = string
description = "The URL for the Ubuntu 24.10 LXC image"
type = string
default = "https://mirrors.servercentral.com/ubuntu-cloud-images/releases/24.10/release-20250701/ubuntu-24.10-server-cloudimg-amd64-root.tar.xz"
}
variable "release_20250701_ubuntu_24_10_lxc_img_checksum" {
type = string
description = "The checksum for the Ubuntu 24.10 LXC image"
type = string
default = "6caa4e90e4c2ae33d3fff0526c75cfc3d221e0c1ccd49d01229a44776af126d1"
}