masto-aio/terraform/namecheap/dns_namecheap.tf

27 lines
571 B
Terraform
Raw Normal View History

2024-01-20 12:58:49 -08:00
# configure a namecheap managed domain to use AWS Route53 nameservers
terraform {
required_providers {
namecheap = {
source = "namecheap/namecheap"
version = ">= 2.0.0"
}
}
}
provider "namecheap" {
user_name = "{{DNS_NAMECHEAP_API_USERNAME}}"
api_user = "{{DNS_NAMECHEAP_API_USERNAME}}"
api_key = "{{DNS_NAMECHEAP_API_KEY}}"
use_sandbox = false
}
resource "namecheap_domain_records" "mastodon" {
domain = "{{DOMAIN_NAME}}"
mode = "OVERWRITE"
nameservers = module.zone.route53_zone_name_servers["{{DOMAIN_NAME}}"]
}