Skip to content

Commit

Permalink
fix: add option for fqdn
Browse files Browse the repository at this point in the history
  • Loading branch information
jsbroks committed Aug 30, 2024
1 parent e29d7b8 commit a39dc53
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 4 deletions.
4 changes: 4 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ resource "google_compute_managed_ssl_certificate" "this" {
module "helm_release" {
source = "./modules/helm_release"

fqdn = var.fqdn

chart_version = var.chart_version

google_auth = var.google_auth

redis_host = module.redis.redis_host
Expand Down
8 changes: 7 additions & 1 deletion modules/helm_release/main.tf
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
locals {

other_settings = {
"global.fqdn" = var.fqdn,
}

image_tags = {
"migrations.image.tag" = "26397ff",
"webservice.image.tag" = "0d18a53",
Expand Down Expand Up @@ -47,10 +52,11 @@ resource "helm_release" "this" {
name = "ctrlplane"
chart = "ctrlplane"
repository = "https://charts.ctrlplane.dev/"
version = "0.1.15"
version = var.chart_version

dynamic "set" {
for_each = merge(
local.other_settings,
local.image_tags,
local.auth_providers_settings,
local.postgres_settings,
Expand Down
11 changes: 10 additions & 1 deletion modules/helm_release/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,18 @@ variable "pre_shared_cert" {
}

variable "google_auth" {
type = object({
type = object({
client_id = string
client_secret = string
})
description = "The Google OAuth client ID and secret."
}

variable "chart_version" {
type = string
}

variable "fqdn" {
type = string
default = ""
}
14 changes: 12 additions & 2 deletions variables.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
variable "fqdn" {
type = string
description = "The fully qualified domain name for the resources."
}

variable "namespace" {
type = string
description = "The name prefix for all resources created."
Expand Down Expand Up @@ -45,9 +50,14 @@ variable "domains" {
}

variable "google_auth" {
type = object({
type = object({
client_id = string
client_secret = string
})
description = "The Google OAuth client ID and secret."
}
}

variable "chart_version" {
type = string
default = "0.1.17"
}

0 comments on commit a39dc53

Please sign in to comment.