Skip to content

Commit

Permalink
Moved klab password to secrets
Browse files Browse the repository at this point in the history
  • Loading branch information
Agnieszka Figiel committed Nov 28, 2023
1 parent 2aafbc5 commit 3220c10
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions infrastructure/base/modules/env/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,14 @@ module "nextauth_secret" {
use_random_value = true
}

module "klab_api_password" {
source = "../secret_value"
region = var.gcp_region
key = "${var.project_name}_klab_api_password"
value = var.klab_api_password
use_random_value = false
}

locals {
frontend_docker_build_args = {
TRANSIFEX_TOKEN = var.transifex_token
Expand Down Expand Up @@ -240,6 +248,9 @@ module "backend_cloudrun" {
}, {
name = "ENCRYPTION_DERIVATION_SALT"
secret_name = module.rails_encryption_derivation_salt.secret_name
}, {
name = "KLAB_API_PASSWORD"
secret_name = module.klab_api_password.secret_name
}, length(module.http_auth_password) > 0 ? [{
name = "HTTP_AUTH_PASSWORD"
secret_name = module.http_auth_password[0].secret_name
Expand Down Expand Up @@ -338,10 +349,6 @@ module "backend_cloudrun" {
name = "KLAB_API_USERNAME"
value = var.klab_api_username
},
{
name = "KLAB_API_PASSWORD"
value = var.klab_api_password
},
{
name = "KLAB_ENABLED"
value = var.klab_enabled
Expand Down Expand Up @@ -384,6 +391,9 @@ module "jobs_cloudrun" {
}, {
name = "ENCRYPTION_DERIVATION_SALT"
secret_name = module.rails_encryption_derivation_salt.secret_name
}, {
name = "KLAB_API_PASSWORD"
secret_name = module.klab_api_password.secret_name
}
]
env_vars = [
Expand Down Expand Up @@ -475,10 +485,6 @@ module "jobs_cloudrun" {
name = "KLAB_API_USERNAME"
value = var.klab_api_username
},
{
name = "KLAB_API_PASSWORD"
value = var.klab_api_password
},
{
name = "KLAB_ENABLED"
value = var.klab_enabled
Expand Down

0 comments on commit 3220c10

Please sign in to comment.