first namecheap domain added
parent
b9b39a45fa
commit
8c3b66dfe2
6
main.tf
6
main.tf
|
@ -1,3 +1,9 @@
|
||||||
terraform {
|
terraform {
|
||||||
backend "pg" {}
|
backend "pg" {}
|
||||||
|
required_providers {
|
||||||
|
namecheap = {
|
||||||
|
source = "namecheap/namecheap"
|
||||||
|
version = ">= 2.0.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,24 @@
|
||||||
|
// https://registry.terraform.io/providers/namecheap/namecheap/latest/docs
|
||||||
|
|
||||||
|
variable "caladan-ip" {
|
||||||
|
type = string
|
||||||
|
default = "139.162.137.29"
|
||||||
|
}
|
||||||
|
|
||||||
|
provider "namecheap" {
|
||||||
|
user_name = "gthar"
|
||||||
|
api_user = "gthar"
|
||||||
|
client_ip = var.caladan-ip
|
||||||
|
use_sandbox = false
|
||||||
|
}
|
||||||
|
|
||||||
|
resource "namecheap_domain_records" "monotremata-xyz" {
|
||||||
|
domain = "monotremata.xyz"
|
||||||
|
mode = "MERGE" // maybe eventually move to OVERWRITE
|
||||||
|
|
||||||
|
record {
|
||||||
|
hostname = "@"
|
||||||
|
type = "A"
|
||||||
|
address = var.caladan-ip
|
||||||
|
}
|
||||||
|
}
|
|
@ -2,5 +2,7 @@
|
||||||
|
|
||||||
export HTTP_PROXY=caladan:8888
|
export HTTP_PROXY=caladan:8888
|
||||||
export HTTPS_PROXY=caladan:8888
|
export HTTPS_PROXY=caladan:8888
|
||||||
|
NAMECHEAP_API_KEY=$(pass namecheap.com/api_key)
|
||||||
|
export NAMECHEAP_API_KEY
|
||||||
|
|
||||||
terraform "$@"
|
terraform "$@"
|
||||||
|
|
Loading…
Reference in New Issue