0

I'm sending my cloud-init file to Terraform via user_data. Is this stored anywhere on the machine that runs it? I know it may get merged with other stuff before it's run.

1 Answer 1

1

It seems to be stored under

/var/lib/cloud/instances

Under your instance id.

cd /var/lib/cloud/instances/$(cloud-init query instance_id)

For me I found the information I wanted in user-data.txt.

sudo cat "/var/lib/cloud/instances/$(cloud-init query instance_id)/user-data.txt"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.