Terraform, OpenTofu and Pulumi

Projects: Terraform, OpenTofu, Pulumi

A hostname is worth most at the moment the machine is created, and machines are created in Terraform. The provider is on the Terraform and OpenTofu registries, so terraform init and tofu init both fetch it by name.

terraform {
  required_providers {
    dnsmint = {
      source  = "dnsmint/dnsmint"
    }
  }
}

resource "dnsmint_hostname" "agent" {
  ip = aws_instance.agent.public_ip
}

Pulumi needs nothing of ours. It generates an SDK from the Terraform provider in whichever language your project is.

$ pulumi package add terraform-provider dnsmint/dnsmint

That writes Hostname, Record and ApiKey into your project and installs the dependency. The resources behave as they do in Terraform, including the release rule below.

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.