Skip to content

Commit

Permalink
fix(lxc): add missing start params on container clone create
Browse files Browse the repository at this point in the history
Signed-off-by: Rafał Safin <rafal.safin@rafsaf.pl>
  • Loading branch information
Rafał Safin committed Dec 26, 2023
1 parent d8f82d4 commit 7215143
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions proxmoxtf/resource/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -918,6 +918,11 @@ 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{}

started := types.CustomBool(d.Get(mkResourceVirtualEnvironmentContainerStarted).(bool))
startOnBoot := types.CustomBool(d.Get(mkResourceVirtualEnvironmentContainerStartOnBoot).(bool))
updateBody.Start = &started
updateBody.StartOnBoot = &startOnBoot

console := d.Get(mkResourceVirtualEnvironmentContainerConsole).([]interface{})

if len(console) > 0 {
Expand Down

0 comments on commit 7215143

Please sign in to comment.