1

I'm using an AWS AMI, ami-032138b8a0ee244c9 (N. Virginia), which is a stock Clear Linux OS image built in June this year.

At instance creation, it is not running the user data it is provisioned with. The aws console can display the user data correctly. On the instance, the file /var/lib/cloud/aws-user-data contains both the #cloud-config lines and the #!/bin/bash user data script lines.

But there is no /var/lib/cloud/instances directory and no /var/log/cloud-init-output.log.

I'm using terraform to create the instance but this doesn't seem like a terraform issue because the user data I specified made it into instance.

Could the Clear Linux OS image not be built properly to get the user data script run or is there some configuration I am responsible for? TIA.

WeakPointer
  • 3,087
  • 27
  • 22
  • Are you sure that your script is correct? What happens if you only try to create a file or folder, does it work? – dooms Aug 16 '19 at 11:03
  • Believe my script is correct. I've worked around this by creating a file with the file provisioner and then calling it with the remote-exec provisioner. Also believe my script is correct because I could build it by pulling the parts out of the was-user-data file and calling it manually as root. Also believe my script can't be at fault because the cloud-init-output.log isn't created. – WeakPointer Aug 16 '19 at 13:28

0 Answers0