Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
mattops committed Jan 17, 2025
1 parent c6db683 commit d4b00ff
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Generate a secure random session secret
resource "kubernetes_secret" "client_secret" {
count = var.client_secret ? 1 : 0
count = var.source_template_repo == "hmpps-template-kotlin" ? 1 : 0
metadata {
name = "${var.application}-client-secret"
namespace = var.namespace
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ resource "random_password" "session_secret" {
numeric = true
}
resource "kubernetes_secret" "session_secret" {
count = var.session_secret ? 1 : 0
count = var.source_template_repo == "hmpps-template-typescript" ? 1 : 0
metadata {
name = "${var.application}-session-secret"
namespace = var.namespace
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,6 @@ variable "serviceaccount_name" {
default = "github-actions-sa"
}

variable "client_secret" {
description = "Set to 'true' to create the initial client secret required for kotlin template apps"
default = false
}

variable "session_secret" {
description = "Set to 'true' to create the initial session secret required for typescript template apps"
default = false
variable "source_template_repo" {
description = "The source template repository used for this app, e.g. 'hmpps-template-kotlin' or 'hmpps-template-typescript'"
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module "hmpps_template_kotlin" {
environment = var.environment # Should match environment name used in helm values file e.g. values-dev.yaml
is_production = var.is_production
application_insights_instance = "dev" # Either "dev", "preprod" or "prod"
client_secret = true
source_template_repo = "hmpps-template-kotlin"

team_name = var.team_name
infrastructure_support = var.infrastructure_support
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module "hmpps_template_typescript" {
environment = var.environment # Should match environment name used in helm values file e.g. values-dev.yaml
is_production = var.is_production
application_insights_instance = "dev" # Either "dev", "preprod" or "prod"
session_secret = true
source_template_repo = "hmpps-template-typescript"

team_name = var.team_name
infrastructure_support = var.infrastructure_support
Expand Down

0 comments on commit d4b00ff

Please sign in to comment.