Terraform and OpenTofu
A hostname is worth most at the moment the machine is created, and machines are created in Terraform. The provider is on the registry, so terraform init fetches it by name. OpenTofu takes the same source.
terraform {
required_providers {
dnsmint = {
source = "dnsmint/dnsmint"
}
}
}
resource "dnsmint_hostname" "agent" {
ip = aws_instance.agent.public_ip
}Changing the address repoints in place; changing the subdomain or domain replaces, because those are what the name is. Worth knowing before your first plan: destroy releases the hostname, and a release is permanent. That is not how a DNS record behaves, so put prevent_destroy on anything you would mind losing.
Every recipe is verified against the client's current release. The other integrations cover the rest, and the quickstart goes from a bare address to HTTPS without any of them.