Skip to content
Snippets Groups Projects
Commit 5437f68b authored by Hanzla Sajid's avatar Hanzla Sajid
Browse files

Merge branch 'main' into production

parents d38e5458 eb84e2ad
No related branches found
No related tags found
No related merge requests found
......@@ -99,6 +99,11 @@ resource "google_cloud_run_service" "chat_push_gateway" {
# possible values: all-traffic/private-ranges-only(default) https://cloud.google.com/sdk/gcloud/reference/run/services/update#--vpc-egress
"run.googleapis.com/vpc-access-egress" = "private-ranges-only"
}
# labels set on the revision level
labels = {
"environment_type" = local.environment_type
"holi_service" = "chat-push-gateway"
}
}
}
......@@ -108,6 +113,11 @@ resource "google_cloud_run_service" "chat_push_gateway" {
# possible values: all/internal/internal-and-cloud-load-balancing https://cloud.google.com/sdk/gcloud/reference/run/services/update#--ingress
"run.googleapis.com/ingress" = "internal"
}
# labels set on the service level
labels = {
"environment_type" = local.environment_type
"holi_service" = "chat-push-gateway"
}
}
traffic {
......
......@@ -140,6 +140,11 @@ resource "google_cloud_run_service" "chat_server" {
# this needs to be set to all-traffic in order to route a cloud run url correctly, since it does resolve to a non-private ip address.
"run.googleapis.com/vpc-access-egress" = "all-traffic"
}
# labels set on the revision level
labels = {
"environment_type" = local.environment_type
"holi_service" = "chat-server"
}
}
}
......@@ -149,6 +154,11 @@ resource "google_cloud_run_service" "chat_server" {
# possible values: all/internal/internal-and-cloud-load-balancing https://cloud.google.com/sdk/gcloud/reference/run/services/update#--ingress
"run.googleapis.com/ingress" = "all"
}
# labels set on the service level
labels = {
"environment_type" = local.environment_type
"holi_service" = "chat-server"
}
}
traffic {
......
......@@ -2,6 +2,7 @@ locals {
# predefined environment names are staging, production, and <branchname>
environment = terraform.workspace
environment_name = trim(substr(local.environment, 0, 22), ".-") # limits the length of the name that it fits constraints google imposes for some resources, e.g. project ids
environment_type = contains(["staging", "production"], local.environment) ? local.environment : "review"
# the dns name can be at most 64 chars in total
# e.g. development-chat.holi.social and chat.holi.social
......
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