Skip to content

Commit d7dc7b8

Browse files
committed
fix: add github bot options
1 parent 79e9414 commit d7dc7b8

File tree

4 files changed

+38
-3
lines changed

4 files changed

+38
-3
lines changed

main.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,8 @@ module "helm_release" {
9191

9292
google_auth = var.google_auth
9393

94+
github_bot = var.github_bot
95+
9496
redis_host = module.redis.redis_host
9597
redis_port = module.redis.redis_port
9698
redis_password = module.redis.redis_auth_string

modules/helm_release/main.tf

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,14 @@ locals {
1919
"global.postgresql.database" = var.postgres_database,
2020
}
2121

22+
integrations_settings = var.github_bot != null ? {
23+
"global.integrations.github.bot.name" = var.github_bot.name
24+
"global.integrations.github.bot.appId" = var.github_bot.app_id
25+
"global.integrations.github.bot.clientId" = var.github_bot.client_id
26+
"global.integrations.github.bot.clientSecret" = var.github_bot.client_secret
27+
"global.integrations.github.bot.privateKey" = var.github_bot.client_private_key
28+
} : {}
29+
2230
auth_providers_settings = {
2331
"global.authProviders.google.clientId" = var.google_auth.client_id,
2432
"global.authProviders.google.clientSecret" = var.google_auth.client_secret,
@@ -62,7 +70,8 @@ resource "helm_release" "this" {
6270
local.postgres_settings,
6371
local.redis_settings,
6472
local.ingress_annotations,
65-
local.service_account_annotations
73+
local.service_account_annotations,
74+
local.integrations_settings,
6675
)
6776
content {
6877
name = set.key

modules/helm_release/variables.tf

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,4 +66,16 @@ variable "chart_version" {
6666
variable "fqdn" {
6767
type = string
6868
default = ""
69-
}
69+
}
70+
71+
variable "github_bot" {
72+
type = object({
73+
name = string
74+
app_id = string
75+
client_id = string
76+
client_secret = string
77+
client_private_key = string
78+
})
79+
description = "The GitHub bot user and token."
80+
default = null
81+
}

variables.tf

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,5 +59,17 @@ variable "google_auth" {
5959

6060
variable "chart_version" {
6161
type = string
62-
default = "0.1.20"
62+
default = "0.1.23"
63+
}
64+
65+
variable "github_bot" {
66+
type = object({
67+
name = string
68+
app_id = string
69+
client_id = string
70+
client_secret = string
71+
client_private_key = string
72+
})
73+
description = "The GitHub bot user and token."
74+
default = null
6375
}

0 commit comments

Comments
 (0)