minor refactoring
parent
c7b32af8be
commit
322445b89f
|
@ -1,6 +1,3 @@
|
||||||
provider "linode" {
|
|
||||||
}
|
|
||||||
|
|
||||||
# https://www.linode.com/docs/guides/import-existing-infrastructure-to-terraform/
|
# https://www.linode.com/docs/guides/import-existing-infrastructure-to-terraform/
|
||||||
resource "linode_instance" "caladan-vm" {
|
resource "linode_instance" "caladan-vm" {
|
||||||
label = "caladan"
|
label = "caladan"
|
17
main.tf
17
main.tf
|
@ -9,5 +9,22 @@ terraform {
|
||||||
source = "linode/linode"
|
source = "linode/linode"
|
||||||
version = ">= 1.29.0"
|
version = ">= 1.29.0"
|
||||||
}
|
}
|
||||||
|
vultr = {
|
||||||
|
source = "vultr/vultr"
|
||||||
|
version = "2.11.4"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
provider "namecheap" {
|
||||||
|
user_name = "gthar"
|
||||||
|
api_user = "gthar"
|
||||||
|
client_ip = "139.162.137.29" // caladan's public IP
|
||||||
|
use_sandbox = false
|
||||||
|
}
|
||||||
|
|
||||||
|
provider "linode" {
|
||||||
|
}
|
||||||
|
|
||||||
|
provider "vultr" {
|
||||||
|
}
|
||||||
|
|
|
@ -127,13 +127,6 @@ variable "sloth-subdomains" {
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
provider "namecheap" {
|
|
||||||
user_name = "gthar"
|
|
||||||
api_user = "gthar"
|
|
||||||
client_ip = var.hosts.caladan.v4
|
|
||||||
use_sandbox = false
|
|
||||||
}
|
|
||||||
|
|
||||||
resource "namecheap_domain_records" "monotremata-xyz" {
|
resource "namecheap_domain_records" "monotremata-xyz" {
|
||||||
domain = "monotremata.xyz"
|
domain = "monotremata.xyz"
|
||||||
mode = "MERGE"
|
mode = "MERGE"
|
|
@ -1,12 +1,14 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
NAMECHEAP_API_KEY=$(pass namecheap.com/api_key)
|
||||||
|
LINODE_TOKEN=$(pass linode.com/token)
|
||||||
|
VULTR_API_KEY=$(pass vultr.com/api_key)
|
||||||
|
|
||||||
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
|
export NAMECHEAP_API_KEY
|
||||||
|
|
||||||
LINODE_TOKEN=$(pass linode.com/token)
|
|
||||||
export LINODE_TOKEN
|
export LINODE_TOKEN
|
||||||
|
export VULTR_API_KEY
|
||||||
|
|
||||||
terraform "$@"
|
terraform "$@"
|
||||||
|
|
Loading…
Reference in New Issue