Cloud-init ready image fails to set login credentials from a terraform script


New Member
Aug 12, 2021
I would like to provision basic architecture consisting of several master, agent and balancer VMs, totaling at 8 resources. All of the VMs are to be cloned from a prepared cloud-init ready VM template using a Terraform script.

When cloning from a template with login credentials already preset, new VMs are created flawlessly and correctly launched afterwards.

However, when I try to create the VMs and set the credentials in the process using the TF ciuser and cipassword parameters, some (most of the time only ONE, arbitrary one) gets stuck, does not turn on automatically, and TF logs an 500 user name not set error message and crashes.

Expected behaviour:
All VMs are created correctly and boot up with credentials after provisioning.

Actual behaviour:
Some VMs might get stuck in the provisioning process and not proceed afterwards, crashing the terraform script.

Do you have any idea as to what might be causing these crashes?
Last edited:


The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!