Compare commits

...

7 Commits

6 changed files with 61 additions and 21 deletions

View File

@ -17,7 +17,7 @@ resource "digitalocean_record" "enp_en1" {
domain = digitalocean_domain.enp.id
type = "A"
name = "en1"
value = "24.2.156.189"
value = digitalocean_record.enp.value
ttl = 3600
}
@ -28,7 +28,7 @@ resource "digitalocean_record" "enp_vcs" {
domain = digitalocean_domain.enp.id
type = "CNAME"
name = "vcs"
value = "en1.enp.one."
value = "${digitalocean_record.enp_en1.fqdn}."
ttl = 10600
}
@ -36,7 +36,7 @@ resource "digitalocean_record" "enp_ssv" {
domain = digitalocean_domain.enp.id
type = "CNAME"
name = "ssv"
value = "en1.enp.one."
value = "${digitalocean_record.enp_en1.fqdn}."
ttl = 10600
}
@ -44,7 +44,7 @@ resource "digitalocean_record" "enp_pms" {
domain = digitalocean_domain.enp.id
type = "CNAME"
name = "pms"
value = "en1.enp.one."
value = "${digitalocean_record.enp_en1.fqdn}."
ttl = 10600
}
@ -52,7 +52,7 @@ resource "digitalocean_record" "enp_cdn" {
domain = digitalocean_domain.enp.id
type = "CNAME"
name = "cdn"
value = "en2-cdn.nyc3.cdn.digitaloceanspaces.com."
value = "${digitalocean_cdn.enp.endpoint}."
ttl = 3600
}
@ -60,7 +60,7 @@ resource "digitalocean_record" "enp_vpn" {
domain = digitalocean_domain.enp.id
type = "CNAME"
name = "vpn"
value = "en1.enp.one."
value = "${digitalocean_record.enp_en1.fqdn}."
ttl = 10600
}
@ -68,7 +68,7 @@ resource "digitalocean_record" "enp_www" {
domain = digitalocean_domain.enp.id
type = "CNAME"
name = "www"
value = "en1.enp.one."
value = "${digitalocean_record.enp_en1.fqdn}."
ttl = 10600
}
@ -76,7 +76,7 @@ resource "digitalocean_record" "enp_sso" {
domain = digitalocean_domain.enp.id
type = "CNAME"
name = "sso"
value = "en1.enp.one."
value = "${digitalocean_record.enp_en1.fqdn}."
ttl = 10600
}
@ -84,15 +84,7 @@ resource "digitalocean_record" "enp_img" {
domain = digitalocean_domain.enp.id
type = "CNAME"
name = "img"
value = "en1.enp.one."
ttl = 10600
}
resource "digitalocean_record" "enp_pdb" {
domain = digitalocean_domain.enp.id
type = "CNAME"
name = "pdb"
value = "en1.enp.one."
value = "${digitalocean_record.enp_en1.fqdn}."
ttl = 10600
}

View File

@ -9,7 +9,7 @@ resource "digitalocean_record" "enpaul" {
domain = digitalocean_domain.enpaul.id
type = "A"
name = "@"
value = "24.2.156.189"
value = digitalocean_record.enp.value
ttl = 3600
}

View File

@ -8,7 +8,7 @@ resource "digitalocean_record" "scipiocapital" {
domain = digitalocean_domain.scipiocapital.id
type = "A"
name = "@"
value = "24.2.156.189"
value = digitalocean_record.enp.value
ttl = 3600
}
@ -16,7 +16,7 @@ resource "digitalocean_record" "scipiocapital_app" {
domain = digitalocean_domain.scipiocapital.id
type = "CNAME"
name = "app"
value = "en1.enp.one."
value = "${digitalocean_record.enp_en1.fqdn}."
ttl = 43200
}
@ -24,7 +24,7 @@ resource "digitalocean_record" "scipiocapital_notify" {
domain = digitalocean_domain.scipiocapital.id
type = "CNAME"
name = "notify"
value = "en1.enp.one."
value = "${digitalocean_record.enp_en1.fqdn}."
ttl = 43200
}

View File

@ -0,0 +1,13 @@
resource "digitalocean_project" "scipio" {
name = "Scipio Capital"
description = "Eventual home of Scipio Capital systems"
purpose = "Service or API"
environment = "Production"
}
resource "digitalocean_project_resources" "scipio" {
project = digitalocean_project.scipio.id
resources = [
digitalocean_domain.scipiocapital.urn,
]
}

View File

@ -0,0 +1,17 @@
resource "digitalocean_project" "skylab" {
name = "SkyLab"
description = "SkyLab resources, with emphasis on Sky"
purpose = "Operational / Developer tooling"
environment = "Development"
is_default = true
}
resource "digitalocean_project_resources" "skylab" {
project = digitalocean_project.skylab.id
resources = [
digitalocean_domain.allaroundhere.urn,
digitalocean_domain.enpaul.urn,
digitalocean_domain.enp.urn,
digitalocean_spaces_bucket.enp_cdn.urn
]
}

View File

@ -0,0 +1,18 @@
resource "digitalocean_spaces_bucket" "enp_cdn" {
name = "en2-cdn"
region = "nyc3"
acl = "public-read"
force_destroy = false
}
resource "digitalocean_certificate" "enp_cdn" {
name = "CDN"
type = "lets_encrypt"
domains = ["cdn.enp.one", "enp.one"]
}
resource "digitalocean_cdn" "enp" {
origin = digitalocean_spaces_bucket.enp_cdn.bucket_domain_name
custom_domain = "cdn.enp.one"
certificate_name = digitalocean_certificate.enp_cdn.name
}