Skip to content

Commit

Permalink
fix: add github bot options
Browse files Browse the repository at this point in the history
  • Loading branch information
jsbroks committed Sep 4, 2024
1 parent 79e9414 commit d7dc7b8
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 3 deletions.
2 changes: 2 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ module "helm_release" {

google_auth = var.google_auth

github_bot = var.github_bot

redis_host = module.redis.redis_host
redis_port = module.redis.redis_port
redis_password = module.redis.redis_auth_string
Expand Down
11 changes: 10 additions & 1 deletion modules/helm_release/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@ locals {
"global.postgresql.database" = var.postgres_database,
}

integrations_settings = var.github_bot != null ? {
"global.integrations.github.bot.name" = var.github_bot.name
"global.integrations.github.bot.appId" = var.github_bot.app_id
"global.integrations.github.bot.clientId" = var.github_bot.client_id
"global.integrations.github.bot.clientSecret" = var.github_bot.client_secret
"global.integrations.github.bot.privateKey" = var.github_bot.client_private_key
} : {}

auth_providers_settings = {
"global.authProviders.google.clientId" = var.google_auth.client_id,
"global.authProviders.google.clientSecret" = var.google_auth.client_secret,
Expand Down Expand Up @@ -62,7 +70,8 @@ resource "helm_release" "this" {
local.postgres_settings,
local.redis_settings,
local.ingress_annotations,
local.service_account_annotations
local.service_account_annotations,
local.integrations_settings,
)
content {
name = set.key
Expand Down
14 changes: 13 additions & 1 deletion modules/helm_release/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,16 @@ variable "chart_version" {
variable "fqdn" {
type = string
default = ""
}
}

variable "github_bot" {
type = object({
name = string
app_id = string
client_id = string
client_secret = string
client_private_key = string
})
description = "The GitHub bot user and token."
default = null
}
14 changes: 13 additions & 1 deletion variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,17 @@ variable "google_auth" {

variable "chart_version" {
type = string
default = "0.1.20"
default = "0.1.23"
}

variable "github_bot" {
type = object({
name = string
app_id = string
client_id = string
client_secret = string
client_private_key = string
})
description = "The GitHub bot user and token."
default = null
}

0 comments on commit d7dc7b8

Please sign in to comment.