From 2ba5af93810e29ef42e0f02e9dca8a0d161abca7 Mon Sep 17 00:00:00 2001 From: Otho Date: Sat, 31 Dec 2022 00:24:28 -0500 Subject: [PATCH] Initialize dns. --- domain.tf | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 domain.tf diff --git a/domain.tf b/domain.tf new file mode 100644 index 0000000..da1d8e9 --- /dev/null +++ b/domain.tf @@ -0,0 +1,49 @@ +terraform { + required_providers { + namecheap = { + source = "namecheap/namecheap" + version = "~> 2.1.0" + } + } + + backend "http" { + address = "https://asciireactor.com/api/v4/projects/131/terraform/state/dns" + lock_address = "https://asciireactor.com/api/v4/projects/131/terraform/state/dns/lock" + unlock_address = "https://asciireactor.com/api/v4/projects/131/terraform/state/dns/lock" + lock_method = "POST" + unlock_method = "DELETE" + retry_wait_min = 5 + } +} + +provider "namecheap" {} + +resource "namecheap_domain_records" "othonotes-com" { + domain = "othonotes.com" + record { + address = "rprxy-0.saline.o4data.net" + hostname = "@" + type = "ALIAS" + ttl = 300 + } + record { + address = "othonotes.com." + hostname = "www" + type = "CNAME" + } +} + +resource "namecheap_domain_records" "othostash-com" { + domain = "othostash.com" + + record { + address = "96.78.236.124" + hostname = "@" + type = "A" + } + record { + address = "othostash.com." + hostname = "www" + type = "CNAME" + } +}