flora-6: create dirs for terraform files in DC

lev-1 and cgn-1
This commit is contained in:
teutat3s 2022-11-29 02:38:10 +01:00
parent 349882ba4b
commit 136adbae53
Signed by: teutat3s
GPG key ID: 4FA1D3FA524F22C1
8 changed files with 17 additions and 9 deletions

View file

@ -10,7 +10,7 @@ nix develop --command zsh
### terraform provider docs
The following NixOS instances were deployed in DC `lev-1` using terraform:
- `pub-solar-infra-vm-1`
- `flora-6`
The Namecheap API was used to create the DNS records for `*.pub.solar`.

3
terraform/lev-1/.envrc Normal file
View file

@ -0,0 +1,3 @@
source_up
ttp set lev-1-pub_solar

View file

@ -5,24 +5,29 @@ resource "namecheap_domain_records" "pub-solar" {
email_type = "MX"
record {
hostname = "infra-1"
hostname = "flora-6"
type = "CNAME"
address = "infra-1.svc.e5756d08-36fd-424b-f8bc-acdb92ca7b82.lev-1.greenbaum.zone"
address = "flora-6.svc.e5756d08-36fd-424b-f8bc-acdb92ca7b82.lev-1.greenbaum.zone"
}
record {
hostname = "auth"
type = "CNAME"
address = "infra-1.svc.e5756d08-36fd-424b-f8bc-acdb92ca7b82.lev-1.greenbaum.zone"
address = "flora-6.svc.e5756d08-36fd-424b-f8bc-acdb92ca7b82.lev-1.greenbaum.zone"
}
record {
hostname = "git"
type = "CNAME"
address = "infra-1.svc.e5756d08-36fd-424b-f8bc-acdb92ca7b82.lev-1.greenbaum.zone"
address = "flora-6.svc.e5756d08-36fd-424b-f8bc-acdb92ca7b82.lev-1.greenbaum.zone"
}
record {
hostname = "obs-portal"
type = "CNAME"
address = "flora-6.svc.e5756d08-36fd-424b-f8bc-acdb92ca7b82.lev-1.greenbaum.zone"
}
record {
hostname = "vpn"
type = "CNAME"
address = "infra-1.svc.e5756d08-36fd-424b-f8bc-acdb92ca7b82.lev-1.greenbaum.zone"
address = "flora-6.svc.e5756d08-36fd-424b-f8bc-acdb92ca7b82.lev-1.greenbaum.zone"
}
record {
hostname = "cache"

View file

@ -4,7 +4,7 @@
# https://registry.terraform.io/providers/joyent/triton/latest/docs
resource "triton_machine" "pub-solar-infra-vm-1" {
name = "pub-solar-infra-vm-1"
name = "flora-6"
image = "${data.triton_image.nixos.id}"
package = "bhyve-huge"
networks = ["${data.triton_network.public.id}","${data.triton_network.private.id}"]
@ -12,6 +12,6 @@ resource "triton_machine" "pub-solar-infra-vm-1" {
firewall_enabled = false
cns {
services = ["infra-1"]
services = ["flora-6"]
}
}

View file

@ -1,7 +1,7 @@
# https://www.terraform.io/language/v1.2.x/settings/backends/manta
terraform {
backend "manta" {
path = "pub-solar/infra-1"
path = "pub-solar/flora-6"
object_name = "terraform.tfstate"
}
}