mirror of
https://github.com/bpg/terraform-provider-proxmox.git
synced 2025-06-30 02:31:10 +00:00
fix(lxc): add missing onboot
param on container clone create (#838)
* fix(lxc): add missing start params on container clone create Signed-off-by: Rafał Safin <rafal.safin@rafsaf.pl> * fix(lxc): remove set started attr on container clone Signed-off-by: Rafał Safin <rafal.safin@rafsaf.pl> * chore(lxc): add `start_on_boot` to example templates Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com> --------- Signed-off-by: Rafał Safin <rafal.safin@rafsaf.pl> Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com> Co-authored-by: Rafał Safin <rafal.safin@rafsaf.pl> Co-authored-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
This commit is contained in:
parent
d8f82d47b3
commit
40102a6a50
@ -1,6 +1,8 @@
|
||||
resource "proxmox_virtual_environment_container" "example_template" {
|
||||
description = "Managed by Terraform"
|
||||
|
||||
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"))
|
||||
size = 10
|
||||
|
@ -918,6 +918,9 @@ func containerCreateClone(ctx context.Context, d *schema.ResourceData, m interfa
|
||||
// Now that the virtual machine has been cloned, we need to perform some modifications.
|
||||
updateBody := &containers.UpdateRequestBody{}
|
||||
|
||||
startOnBoot := types.CustomBool(d.Get(mkResourceVirtualEnvironmentContainerStartOnBoot).(bool))
|
||||
updateBody.StartOnBoot = &startOnBoot
|
||||
|
||||
console := d.Get(mkResourceVirtualEnvironmentContainerConsole).([]interface{})
|
||||
|
||||
if len(console) > 0 {
|
||||
|
Loading…
Reference in New Issue
Block a user