Skip to content

Commit

Permalink
feat: add a subdomain variable
Browse files Browse the repository at this point in the history
  • Loading branch information
lconsuegra authored and lentidas committed Feb 23, 2024
1 parent e9e4204 commit 0515a54
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions locals.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
locals {
domain = format("longhorn.apps.%s", var.base_domain)
domain_full = format("longhorn.apps.%s.%s", var.cluster_name, var.base_domain)
domain = format("longhorn.%s", trimprefix("${var.subdomain}.${var.base_domain}", "."))
domain_full = format("longhorn.%s.%s", trimprefix("${var.subdomain}.${var.cluster_name}", "."), var.base_domain)

# Generate a list of tolerations in a string format of `key=value:effect` for all the tolerations that have
# an `operator` equal to `Equal`. This list of strings will be joined to pass as the value of
Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ variable "base_domain" {
default = null
}

variable "subdomain" {
description = "Sub domain of the cluster. Value used for the ingress' URL of the application."
type = string
default = "apps"
}

variable "cluster_issuer" {
description = "SSL certificate issuer to use. Usually you would configure this value as `letsencrypt-staging` or `letsencrypt-prod` on your root `*.tf` files."
type = string
Expand Down

0 comments on commit 0515a54

Please sign in to comment.