mirror of
https://asciireactor.com/otho/stashbox
synced 2024-11-21 22:45:07 +00:00
Update config to be generic.
This commit is contained in:
parent
de1af64967
commit
581bae2955
64
dns.tf
64
dns.tf
@ -5,60 +5,76 @@ terraform {
|
|||||||
version = "~> 2.1.0"
|
version = "~> 2.1.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
backend "http" {}
|
||||||
backend "http" {
|
|
||||||
address = "https://asciireactor.com/api/v4/projects/133/terraform/state/library-index"
|
|
||||||
lock_address = "https://asciireactor.com/api/v4/projects/133/terraform/state/library-index/lock"
|
|
||||||
unlock_address = "https://asciireactor.com/api/v4/projects/133/terraform/state/library-index/lock"
|
|
||||||
lock_method = "POST"
|
|
||||||
unlock_method = "DELETE"
|
|
||||||
retry_wait_min = 5
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
provider "namecheap" {}
|
provider "namecheap" {}
|
||||||
|
|
||||||
variable "network" {
|
variable "subnet" {
|
||||||
type = string
|
type = string
|
||||||
default = "2603:3015:1003:56cd"
|
default = "fd00::"
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "ipv4" {
|
variable "db_addr" {
|
||||||
type = string
|
type = string
|
||||||
default = "96.78.236.124"
|
default = "1"
|
||||||
|
}
|
||||||
|
|
||||||
|
variable "feed_addr" {
|
||||||
|
type = string
|
||||||
|
default = "2"
|
||||||
|
}
|
||||||
|
|
||||||
|
variable "db_ipv4_addr" {
|
||||||
|
type = string
|
||||||
|
default = "192.168.0.1"
|
||||||
|
}
|
||||||
|
|
||||||
|
variable "domain" {
|
||||||
|
type = string
|
||||||
|
default = "library.local"
|
||||||
|
}
|
||||||
|
|
||||||
|
variable "feed_subdomain_name" {
|
||||||
|
type = string
|
||||||
|
default = "feed"
|
||||||
|
}
|
||||||
|
|
||||||
|
variable "plex_subdomain_name" {
|
||||||
|
type = string
|
||||||
|
default = "plex"
|
||||||
}
|
}
|
||||||
|
|
||||||
resource "namecheap_domain_records" "othostash" {
|
resource "namecheap_domain_records" "othostash" {
|
||||||
domain = "othostash.com"
|
domain = var.domain
|
||||||
record {
|
record {
|
||||||
hostname = "@"
|
hostname = "@"
|
||||||
address = "${var.network}::dad:db"
|
address = "${var.subnet}${var.db_addr}"
|
||||||
type = "AAAA"
|
type = "AAAA"
|
||||||
}
|
}
|
||||||
record {
|
record {
|
||||||
hostname = "feed"
|
hostname = var.feed_subdomain_name
|
||||||
address = "${var.network}::dad:feed"
|
address = "${var.subnet}${var.feed_addr}"
|
||||||
type = "AAAA"
|
type = "AAAA"
|
||||||
}
|
}
|
||||||
record {
|
record {
|
||||||
hostname = "www"
|
hostname = "www"
|
||||||
address = "othostash.com"
|
address = var.domain
|
||||||
type = "CNAME"
|
type = "CNAME"
|
||||||
}
|
}
|
||||||
record {
|
record {
|
||||||
hostname = "plex"
|
hostname = var.plex_subdomain_name
|
||||||
address = "feed.othostash.com"
|
address = "${var.feed_subdomain_name}.${var.domain}"
|
||||||
type = "CNAME"
|
type = "CNAME"
|
||||||
}
|
}
|
||||||
|
|
||||||
record {
|
record {
|
||||||
hostname = "@"
|
hostname = "@"
|
||||||
address = var.ipv4
|
address = var.db_ipv4_addr
|
||||||
type = "A"
|
type = "A"
|
||||||
}
|
}
|
||||||
record {
|
record {
|
||||||
hostname = "feed"
|
hostname = var.feed_subdomain_name
|
||||||
address = var.ipv4
|
address = var.db_ipv4_addr
|
||||||
type = "A"
|
type = "A"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user