27 lines
571 B
Terraform
27 lines
571 B
Terraform
|
|
||
|
# 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}}"]
|
||
|
}
|
||
|
|