Skip to content

Commit

Permalink
remove old annotations and move to tf fields (#303)
Browse files Browse the repository at this point in the history
* Improve response pattern, runs behind the scenes.

* will this work then ?

* increase attempt deadline to make sure gh clients are created

* Moved to using harpocrates and added loglevel to app config

* provider fix

* fix resource to v2

* more fix

* One step closer to a correct config

* Maybe this fixes it :)

* string fix

* fixes to v2

* explicit tell about google-beta providers

* needs more cow bell

* docs

* a better log check

* moved away from annotations
  • Loading branch information
brondum authored Jul 24, 2023
1 parent b55b032 commit ff3cc0d
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions terraform/modules/cloud_run/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,16 @@ resource "google_cloud_run_v2_service" "main" {
service_account = "${var.service}-v3@${var.project_id}.iam.gserviceaccount.com"
timeout = "1800s"
max_instance_request_concurrency = var.container_concurrency
scaling {
min_instance_count = var.scaling["min"]
max_instance_count = var.scaling["max"]
}
labels = {
env = var.env
service = var.service
team = var.team
version = replace(var.tag, ".", "_")
}
annotations = {
"autoscaling.knative.dev/maxScale" = var.scaling["max"]
"autoscaling.knative.dev/minScale" = var.scaling["min"]
"run.googleapis.com/cloudsql-instances" = var.db_instance

}
containers {
name = var.name
image = "europe-docker.pkg.dev/artifacts-pub-prod-b57f/public-docker/${var.service}:${var.tag}"
Expand All @@ -50,6 +48,10 @@ resource "google_cloud_run_v2_service" "main" {
name = "secrets"
mount_path = "/secrets"
}
volume_mounts {
name = "cloudsql"
mount_path = "/cloudsql"
}
}
containers {
name = "secret-dumper"
Expand Down Expand Up @@ -120,6 +122,12 @@ resource "google_cloud_run_v2_service" "main" {
name = "secrets"
empty_dir {}
}
volumes {
name = "cloudsql"
cloud_sql_instance {
instances = [var.db_instance]
}
}
}

traffic {
Expand Down

0 comments on commit ff3cc0d

Please sign in to comment.