mirror of
https://github.com/bpg/terraform-provider-proxmox.git
synced 2025-06-30 02:31:10 +00:00
experiments
This commit is contained in:
parent
dbe26ed58f
commit
32fb46988d
@ -9,12 +9,12 @@ resource "proxmox_virtual_environment_vm" "example_template" {
|
|||||||
|
|
||||||
description = "Managed by Terraform"
|
description = "Managed by Terraform"
|
||||||
|
|
||||||
# disk {
|
# disk {
|
||||||
# datastore_id = local.datastore_id
|
# datastore_id = local.datastore_id
|
||||||
# file_id = proxmox_virtual_environment_file.ubuntu_cloud_image.id
|
# file_id = proxmox_virtual_environment_file.ubuntu_cloud_image.id
|
||||||
# interface = "virtio0"
|
# interface = "virtio0"
|
||||||
# iothread = true
|
# iothread = true
|
||||||
# }
|
# }
|
||||||
|
|
||||||
disk {
|
disk {
|
||||||
datastore_id = local.datastore_id
|
datastore_id = local.datastore_id
|
||||||
@ -23,13 +23,13 @@ resource "proxmox_virtual_environment_vm" "example_template" {
|
|||||||
discard = "on"
|
discard = "on"
|
||||||
ssd = true
|
ssd = true
|
||||||
}
|
}
|
||||||
#
|
|
||||||
# disk {
|
disk {
|
||||||
# datastore_id = "nfs"
|
datastore_id = "nfs"
|
||||||
# interface = "scsi1"
|
interface = "scsi1"
|
||||||
# discard = "ignore"
|
discard = "ignore"
|
||||||
# file_format = "raw"
|
file_format = "raw"
|
||||||
# }
|
}
|
||||||
|
|
||||||
initialization {
|
initialization {
|
||||||
datastore_id = local.datastore_id
|
datastore_id = local.datastore_id
|
||||||
@ -44,14 +44,14 @@ resource "proxmox_virtual_environment_vm" "example_template" {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
user_data_file_id = proxmox_virtual_environment_file.user_config.id
|
user_data_file_id = proxmox_virtual_environment_file.user_config.id
|
||||||
vendor_data_file_id = proxmox_virtual_environment_file.vendor_config.id
|
vendor_data_file_id = proxmox_virtual_environment_file.vendor_config.id
|
||||||
}
|
}
|
||||||
|
|
||||||
name = "terraform-provider-proxmox-example-template"
|
name = "terraform-provider-proxmox-example-template"
|
||||||
|
|
||||||
network_device {
|
network_device {
|
||||||
mtu = 1450
|
mtu = 1450
|
||||||
}
|
}
|
||||||
|
|
||||||
network_device {
|
network_device {
|
||||||
@ -77,7 +77,7 @@ resource "proxmox_virtual_environment_vm" "example" {
|
|||||||
node_name = data.proxmox_virtual_environment_nodes.example.names[0]
|
node_name = data.proxmox_virtual_environment_nodes.example.names[0]
|
||||||
pool_id = proxmox_virtual_environment_pool.example.id
|
pool_id = proxmox_virtual_environment_pool.example.id
|
||||||
vm_id = 2041
|
vm_id = 2041
|
||||||
tags = ["terraform", "ubuntu"]
|
tags = ["terraform", "ubuntu"]
|
||||||
|
|
||||||
clone {
|
clone {
|
||||||
vm_id = proxmox_virtual_environment_vm.example_template.id
|
vm_id = proxmox_virtual_environment_vm.example_template.id
|
||||||
|
@ -779,27 +779,30 @@ func resourceVirtualEnvironmentVM() *schema.Resource {
|
|||||||
MinItems: 0,
|
MinItems: 0,
|
||||||
},
|
},
|
||||||
mkResourceVirtualEnvironmentVMInitializationUserDataFileID: {
|
mkResourceVirtualEnvironmentVMInitializationUserDataFileID: {
|
||||||
Type: schema.TypeString,
|
Type: schema.TypeString,
|
||||||
Description: "The ID of a file containing custom user data",
|
Description: "The ID of a file containing custom user data",
|
||||||
Optional: true,
|
Computed: true,
|
||||||
ForceNew: true,
|
Optional: true,
|
||||||
Default: dvResourceVirtualEnvironmentVMInitializationUserDataFileID,
|
ForceNew: true,
|
||||||
|
//Default: dvResourceVirtualEnvironmentVMInitializationUserDataFileID,
|
||||||
ValidateDiagFunc: getFileIDValidator(),
|
ValidateDiagFunc: getFileIDValidator(),
|
||||||
},
|
},
|
||||||
mkResourceVirtualEnvironmentVMInitializationVendorDataFileID: {
|
mkResourceVirtualEnvironmentVMInitializationVendorDataFileID: {
|
||||||
Type: schema.TypeString,
|
Type: schema.TypeString,
|
||||||
Description: "The ID of a file containing vendor data",
|
Description: "The ID of a file containing vendor data",
|
||||||
Optional: true,
|
Computed: true,
|
||||||
ForceNew: true,
|
Optional: true,
|
||||||
Default: dvResourceVirtualEnvironmentVMInitializationVendorDataFileID,
|
ForceNew: true,
|
||||||
|
//Default: dvResourceVirtualEnvironmentVMInitializationVendorDataFileID,
|
||||||
ValidateDiagFunc: getFileIDValidator(),
|
ValidateDiagFunc: getFileIDValidator(),
|
||||||
},
|
},
|
||||||
mkResourceVirtualEnvironmentVMInitializationNetworkDataFileID: {
|
mkResourceVirtualEnvironmentVMInitializationNetworkDataFileID: {
|
||||||
Type: schema.TypeString,
|
Type: schema.TypeString,
|
||||||
Description: "The ID of a file containing network config",
|
Description: "The ID of a file containing network config",
|
||||||
Optional: true,
|
Computed: true,
|
||||||
ForceNew: true,
|
Optional: true,
|
||||||
Default: dvResourceVirtualEnvironmentVMInitializationNetworkDataFileID,
|
ForceNew: true,
|
||||||
|
//Default: dvResourceVirtualEnvironmentVMInitializationNetworkDataFileID,
|
||||||
ValidateDiagFunc: getFileIDValidator(),
|
ValidateDiagFunc: getFileIDValidator(),
|
||||||
},
|
},
|
||||||
mkResourceVirtualEnvironmentVMInitializationType: {
|
mkResourceVirtualEnvironmentVMInitializationType: {
|
||||||
|
Loading…
Reference in New Issue
Block a user