<p>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.</p>
<p>Cloud-init instance metadata is documented here: <a href="https://cloudinit.readthedocs.io/en/latest/topics/instancedata.html" rel="nofollow noreferrer">https://cloudinit.readthedocs.io/en/latest/topics/instancedata.html</a></p>

CC BY-SA 4.0
2022-02-23T16:03:53.577Z
2022-02-23T16:03:53.577Z
falcojr
<p>What do you call these variables in my <code>cloud-init</code> file,</p>
<pre class="lang-yaml prettyprint-override"><code>- 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/
</code></pre>
<p>You can see here variables like <code>%(region)</code> are these available to all things in <code>cloud-init</code>? Where are these documented?</p>

<cloud-init>
What do you call variables like "%(ec2_region)" in my cloud-init?
Evan Carroll
# What do you call variables like "%(ec2_region)" in my cloud-init?

(Asked by: username_0 on 2022-02-22)

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?

**Tags:** cloud-init


---

## 1 answers

### Answer by username_1 on 2022-02-23. Score: 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>


---

