From 57a7d542804ce886565aa1cc1eaac1b3baf5d8e8 Mon Sep 17 00:00:00 2001 From: Katie McLaughlin Date: Fri, 16 Jun 2023 15:22:35 +1000 Subject: [PATCH 1/4] fix: support deployment suffix for CSRF domain customisation --- infra/service.tf | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/infra/service.tf b/infra/service.tf index f1b12868..05413e76 100644 --- a/infra/service.tf +++ b/infra/service.tf @@ -50,6 +50,10 @@ resource "google_cloud_run_v2_service" "server" { name = "OTEL_TRACES_EXPORTER" value = "gcp_trace" } + env { + name = "DEPLOYMENT_SUFFIX" + value = var.random_suffix ? random_id.suffix.hex : "" + } volume_mounts { name = "cloudsql" mount_path = "/cloudsql" From 1770faa05e51d5fb1af0a34a17cc57e035f6125e Mon Sep 17 00:00:00 2001 From: Katie McLaughlin Date: Mon, 10 Jul 2023 15:45:53 +1000 Subject: [PATCH 2/4] bump minimum required avocano --- infra/variables.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/infra/variables.tf b/infra/variables.tf index 76e8e001..b7845fc9 100644 --- a/infra/variables.tf +++ b/infra/variables.tf @@ -61,7 +61,7 @@ variable "init" { variable "image_version" { type = string - default = "v1.8.1" + default = "v1.8.2" description = "Version of the Container Registry image to use" } From c67a55116be5f9f63c49b29696feabe298fe4120 Mon Sep 17 00:00:00 2001 From: Katie McLaughlin Date: Mon, 10 Jul 2023 16:18:06 +1000 Subject: [PATCH 3/4] bump other places where minimum required avocano --- infra/README.md | 2 +- infra/metadata.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/infra/README.md b/infra/README.md index 016027fe..977d1d65 100644 --- a/infra/README.md +++ b/infra/README.md @@ -48,7 +48,7 @@ Functional examples are included in the | database\_name | Cloud SQL database name | `string` | `"django"` | no | | database\_username | Cloud SQL database name | `string` | `"server"` | no | | enable\_apis | Whether or not to enable underlying apis in this solution. | `bool` | `true` | no | -| image\_version | Version of the Container Registry image to use | `string` | `"v1.8.1"` | no | +| image\_version | Version of the Container Registry image to use | `string` | `"v1.8.2"` | no | | init | Initialize database? | `bool` | `true` | no | | instance\_name | Cloud SQL Instance name | `string` | `"psql"` | no | | labels | A set of key/value label pairs to assign to the resources deployed by this blueprint. | `map(string)` | `{}` | no | diff --git a/infra/metadata.yaml b/infra/metadata.yaml index 890f7e66..04c0cd4c 100644 --- a/infra/metadata.yaml +++ b/infra/metadata.yaml @@ -69,7 +69,7 @@ spec: - name: image_version description: Version of the Container Registry image to use varType: string - defaultValue: v1.8.1 + defaultValue: v1.8.2 - name: init description: Initialize database? varType: bool From 44770a9c412b5f65ee5a1d1ede0e0a78839d7017 Mon Sep 17 00:00:00 2001 From: Katie McLaughlin Date: Wed, 12 Jul 2023 14:50:08 +1000 Subject: [PATCH 4/4] Add context for envvar --- infra/service.tf | 1 + 1 file changed, 1 insertion(+) diff --git a/infra/service.tf b/infra/service.tf index 66c388ea..784cad56 100644 --- a/infra/service.tf +++ b/infra/service.tf @@ -54,6 +54,7 @@ resource "google_cloud_run_v2_service" "server" { name = "OTEL_PYTHON_EXCLUDED_URLS" value = "healthy" } + # Supply the custom suffix, if used, to support automated CSRF code in application settings env { name = "DEPLOYMENT_SUFFIX" value = var.random_suffix ? random_id.suffix.hex : ""