1

What do you call these variables in my cloud-init file,

- http://%(ec2_region)s.ec2.ports.ubuntu.com/ubuntu-ports/
- http://%(availability_zone)s.clouds.ports.ubuntu.com/ubuntu-ports/
- http://%(region)s.clouds.ports.ubuntu.com/ubuntu-ports/

You can see here variables like %(region) are these available to all things in cloud-init? Where are these documented?

1 Answer 1

1

This is called instance metadata. Cloud providers expose metadata to cloud instances which cloud-init then stores and can be used in a few different contexts, such as jinja-templated cloud-init userdata.

Cloud-init instance metadata is documented here: https://cloudinit.readthedocs.io/en/latest/topics/instancedata.html

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.