FAQ | This is a LIVE service | Changelog

Skip to content
Snippets Groups Projects
Commit 37ea7c45 authored by Ryan Kowalewski's avatar Ryan Kowalewski :man_dancing:
Browse files

Merge branch 'issue-44-pre-deploy-env-vars' into 'master'

Added new variable to allow pre-deploy job specific environment variables to be set

Closes #44

See merge request !59
parents 5114bf93 e365d379
No related branches found
No related tags found
1 merge request!59Added new variable to allow pre-deploy job specific environment variables to be set
Pipeline #356825 passed
......@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [8.1.0] - 2023-07-04
### Added
- Added new variable `pre_deploy_job_environment_variables` to optionally override `environment_variables` for pre-deploy jobs.
## [8.0.0] - 2023-06-16
### Added
......
......@@ -36,6 +36,8 @@ locals {
pre_deploy_job_image_name = var.pre_deploy_job_image_name == null ? var.image_name : var.pre_deploy_job_image_name
pre_deploy_job_environment_variables = var.pre_deploy_job_environment_variables == null ? var.environment_variables : var.pre_deploy_job_environment_variables
# Certain ingress styles imply that we disallow external access to the base Cloud Run service.
webapp_allowed_ingress = lookup({
load-balancer = "internal-and-cloud-load-balancing"
......
......@@ -334,7 +334,7 @@ resource "google_cloud_run_v2_job" "pre_deploy" {
args = var.pre_deploy_job_args
dynamic "env" {
for_each = var.environment_variables
for_each = local.pre_deploy_job_environment_variables
content {
name = env.key
......
......@@ -70,6 +70,16 @@ variable "pre_deploy_job_args" {
default = null
}
variable "pre_deploy_job_environment_variables" {
description = <<EOI
Environment variables which can be set on the pre-deploy Cloud Run job. Map from name to value.
By default the var.environment_variables is used
(see locals.tf).
EOI
type = map(string)
default = null
}
variable "grant_sql_client_role_to_webapp_sa" {
description = <<EOI
When set to true the 'roles/cloudsql.client' role will be granted to the
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment