How to customize an instance's DNS?

In some cases you may need to customize certain aspects of the server instance such as DNS or other network settings. You can customize your instance using a cloud-init file.

Using a Custom Cloud-Init /configure/cloud-init

Cloud-init enables automatic configuration of an instance as it boots. It can be used to add keys, set hostnames, run post-install scripts and more.