Changing the hostname on an instance modifies the default server configuration and reinstalls the operating system. This operation may results in data loss when the instance is reinstalled to apply the new hostname.
Follow this guide to change the hostname on a Vultr Cloud Compute instance using the Vultr Customer Portal, or Terraform.
Open your Terraform configuration for the existing Cloud Compute instance.
Update the hostname
value in the instance resource.
resource "vultr_instance" "cc" {
# ...existing fields (region, plan, os_id, label, etc.)
hostname = "new-hostname"
}
Apply the configuration and observe the following output:
Apply complete! Resources: 0 added, 1 changed, 0 destroyed.
No comments yet.