Skip to content

Commit 6c4751b

Browse files
authored
Merge pull request #77 from mutablelogic/dev
Added extra_domains
2 parents 3ce488b + 0f911dd commit 6c4751b

File tree

3 files changed

+25
-12
lines changed

3 files changed

+25
-12
lines changed

nginx-ssl/input.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,12 @@ variable "subdomains" {
8787
default = []
8888
}
8989

90+
variable "extra_domains" {
91+
description = "Additional fully qualified domain names"
92+
type = list(string)
93+
default = []
94+
}
95+
9096
variable "dns_validation" {
9197
description = "DNS validation type (http, cloudflare, duckdns)"
9298
type = string

nginx-ssl/main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ resource "nomad_job" "nginx-ssl" {
2828
zone = var.zone
2929
email = var.email
3030
subdomains = jsonencode(var.subdomains)
31+
extra_domains = jsonencode(var.extra_domains)
3132
dns_validation = var.dns_validation
3233
cloudflare_api_key = var.cloudflare_api_key
3334
staging = var.staging

nginx-ssl/nomad/nginx-ssl.hcl

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,11 @@ variable "subdomains" {
9494
type = list(string)
9595
}
9696

97+
variable "extra_domains" {
98+
description = "Additional fully qualified domain names"
99+
type = list(string)
100+
}
101+
97102
variable "staging" {
98103
description = "Use staging environment"
99104
type = bool
@@ -187,7 +192,7 @@ job "nginx" {
187192

188193
// Reserve 512MB of memory
189194
resources {
190-
memory = 512
195+
memory = 512
191196
memory_max = 1024
192197
}
193198

@@ -241,17 +246,18 @@ job "nginx" {
241246
}
242247

243248
env {
244-
PUID = 101 # maps to user nginx
245-
PGID = 100 # maps to group nginx
246-
TZ = var.timezone
247-
URL = var.zone
248-
EMAIL = var.email
249-
CERTPROVIDER = "letsencrypt"
250-
SUBDOMAINS = length(var.subdomains) == 0 ? "wildcard" : join(",", var.subdomains)
251-
VALIDATION = var.dns_validation == "http" ? "http" : "dns"
252-
DNSPLUGIN = var.dns_validation == "http" ? "" : var.dns_validation
253-
STAGING = var.staging ? "true" : "false"
254-
PROPAGATION = var.propagation
249+
PUID = 101 # maps to user nginx
250+
PGID = 100 # maps to group nginx
251+
TZ = var.timezone
252+
URL = var.zone
253+
EMAIL = var.email
254+
CERTPROVIDER = "letsencrypt"
255+
SUBDOMAINS = length(var.subdomains) == 0 ? "wildcard" : join(",", var.subdomains)
256+
EXTRA_DOMAINS = join(",", var.extra_domains)
257+
VALIDATION = var.dns_validation == "http" ? "http" : "dns"
258+
DNSPLUGIN = var.dns_validation == "http" ? "" : var.dns_validation
259+
STAGING = var.staging ? "true" : "false"
260+
PROPAGATION = var.propagation
255261
}
256262

257263
config {

0 commit comments

Comments
 (0)