0
0
mirror of https://github.com/bpg/terraform-provider-proxmox.git synced 2025-06-29 18:21:10 +00:00

misc(datastores): update datasource references in /example (#1883)

Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
This commit is contained in:
Pavel Boldyrev 2025-04-07 14:12:42 -04:00 committed by GitHub
parent c526208f4b
commit d01bcf4fac
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 12 additions and 48 deletions

View File

@ -2,42 +2,6 @@ data "proxmox_virtual_environment_datastores" "example" {
node_name = data.proxmox_virtual_environment_nodes.example.names[0]
}
output "data_proxmox_virtual_environment_datastores_example_active" {
value = data.proxmox_virtual_environment_datastores.example.active
}
output "data_proxmox_virtual_environment_datastores_example_content_types" {
value = data.proxmox_virtual_environment_datastores.example.content_types
}
output "data_proxmox_virtual_environment_datastores_example_datastore_ids" {
value = data.proxmox_virtual_environment_datastores.example.datastore_ids
}
output "data_proxmox_virtual_environment_datastores_example_enabled" {
value = data.proxmox_virtual_environment_datastores.example.enabled
}
output "data_proxmox_virtual_environment_datastores_example_node_name" {
value = data.proxmox_virtual_environment_datastores.example.node_name
}
output "data_proxmox_virtual_environment_datastores_example_shared" {
value = data.proxmox_virtual_environment_datastores.example.shared
}
output "data_proxmox_virtual_environment_datastores_example_space_available" {
value = data.proxmox_virtual_environment_datastores.example.space_available
}
output "data_proxmox_virtual_environment_datastores_example_space_total" {
value = data.proxmox_virtual_environment_datastores.example.space_total
}
output "data_proxmox_virtual_environment_datastores_example_space_used" {
value = data.proxmox_virtual_environment_datastores.example.space_used
}
output "data_proxmox_virtual_environment_datastores_example_types" {
value = data.proxmox_virtual_environment_datastores.example.types
output "data_proxmox_virtual_environment_datastores_example" {
value = data.proxmox_virtual_environment_datastores.example
}

View File

@ -4,13 +4,13 @@ resource "proxmox_virtual_environment_container" "example_template" {
start_on_boot = "true"
disk {
datastore_id = element(data.proxmox_virtual_environment_datastores.example.datastore_ids, index(data.proxmox_virtual_environment_datastores.example.datastore_ids, "local-lvm"))
datastore_id = "local-lvm"
size = 4
}
mount_point {
// volume mount
volume = element(data.proxmox_virtual_environment_datastores.example.datastore_ids, index(data.proxmox_virtual_environment_datastores.example.datastore_ids, "local-lvm"))
volume = "local-lvm"
size = "4G"
path = "mnt/local"
}
@ -66,7 +66,7 @@ resource "proxmox_virtual_environment_container" "example_template" {
resource "proxmox_virtual_environment_container" "example" {
disk {
datastore_id = element(data.proxmox_virtual_environment_datastores.example.datastore_ids, index(data.proxmox_virtual_environment_datastores.example.datastore_ids, "local-lvm"))
datastore_id = "local-lvm"
}
clone {

View File

@ -4,8 +4,8 @@
resource "proxmox_virtual_environment_file" "user_config" {
content_type = "snippets"
datastore_id = element(data.proxmox_virtual_environment_datastores.example.datastore_ids, index(data.proxmox_virtual_environment_datastores.example.datastore_ids, "local"))
node_name = data.proxmox_virtual_environment_datastores.example.node_name
datastore_id = "local"
node_name = data.proxmox_virtual_environment_nodes.example.names[0]
source_raw {
data = <<-EOF
@ -31,8 +31,8 @@ resource "proxmox_virtual_environment_file" "user_config" {
resource "proxmox_virtual_environment_file" "vendor_config" {
content_type = "snippets"
datastore_id = element(data.proxmox_virtual_environment_datastores.example.datastore_ids, index(data.proxmox_virtual_environment_datastores.example.datastore_ids, "local"))
node_name = data.proxmox_virtual_environment_datastores.example.node_name
datastore_id = "local"
node_name = data.proxmox_virtual_environment_nodes.example.names[0]
source_raw {
data = <<-EOF
@ -52,8 +52,8 @@ resource "proxmox_virtual_environment_file" "vendor_config" {
resource "proxmox_virtual_environment_file" "meta_config" {
content_type = "snippets"
datastore_id = element(data.proxmox_virtual_environment_datastores.example.datastore_ids, index(data.proxmox_virtual_environment_datastores.example.datastore_ids, "local"))
node_name = data.proxmox_virtual_environment_datastores.example.node_name
datastore_id = "local"
node_name = data.proxmox_virtual_environment_nodes.example.names[0]
source_raw {
data = <<-EOF

View File

@ -1,5 +1,5 @@
locals {
datastore_id = element(data.proxmox_virtual_environment_datastores.example.datastore_ids, index(data.proxmox_virtual_environment_datastores.example.datastore_ids, "local-lvm"))
datastore_id = "local-lvm"
}
resource "proxmox_virtual_environment_vm" "example_template" {