cloud-init team mailing list archive
Mailing list archive
Re: cloud-init user data deployed by terraform on custom AWS AMI
I made a look at /var/lib/cloud/instance/user-data.txt and it appears
that the cloud config script is *deployed*.
On Wed, Feb 9, 2022 at 10:30 PM Colin Williams
> I am trying to mount a instance block device (non EBS) similar to
> With the hostname parameter in cloud config I noticed an error ( I
> don't recall the exact location where I saw this)
> I removed the hostname parameter. In the runcmd section I added a line
> to write a file to /tmp/cc to try to see if the script is executed. -
> echo "" > /tmp/cc
> I am not seeing any sign of execution.
> I made a look at /var/lib/cloud/instance/user-data.txt and it appears
> that the cloud config script is executed.
> There appears to be a systemd cloud-init.service enabled. When I look
> at the logs it appears to be displaying a log generating ssh key
> In order to debug this:
> How do I first manually execute the user-data script using cloud-init
> to test functionality without testing terraform deployment?
> How do I get better insight into the cloud-init service or why it's
> not executing the script?
> For example, I don't see anything related to the user-data script from
> journalctl -u cloud-init