industry-website/main.tf

69 lines
1.4 KiB
Terraform
Raw Normal View History

2022-08-21 05:22:38 +00:00
resource "namecheap_domain_records" "top" {
domain = "othoulrich.com"
mode = "MERGE"
record {
address = "otho.boxgraph.net."
hostname = "code"
mx_pref = 10
ttl = 1799
type = "CNAME"
}
record {
address = "othoulrich.com."
hostname = "www"
mx_pref = 10
ttl = 1799
type = "CNAME"
}
record {
2022-08-21 06:02:41 +00:00
address = "otho.boxgraph.net."
2022-08-21 05:22:38 +00:00
hostname = "@"
mx_pref = 10
ttl = 1799
type = "CNAME"
}
}
terraform {
required_providers {
namecheap = {
source = "namecheap/namecheap"
version = "~> 2.1.0"
}
}
backend "http" {
2022-08-21 06:06:04 +00:00
address = "https://asciireactor.com/api/v4/projects/101/terraform/state/app"
lock_address = "https://asciireactor.com/api/v4/projects/101/terraform/state/app/lock"
unlock_address = "https://asciireactor.com/api/v4/projects/101/terraform/state/app/lock"
2022-08-21 05:55:21 +00:00
lock_method = "POST"
unlock_method = "DELETE"
retry_wait_min = 5
2022-08-21 05:22:38 +00:00
}
}
provider "namecheap" {
user_name = var.dns_user_name
api_user = var.dns_api_user
api_key = var.dns_api_key
use_sandbox = var.use_dns_sandbox
}
variable use_dns_sandbox {
type = bool
default = false
}
variable dns_user_name {
type = string
}
variable dns_api_user {
type = string
}
variable dns_api_key {
type = string
}