Skip to content
Snippets Groups Projects
Commit 84135d0a authored by Ole Langbehn's avatar Ole Langbehn
Browse files

NOISSUE add labels to functions and run services for monitoring&logging

parent 34a2266e
No related branches found
No related tags found
No related merge requests found
......@@ -87,6 +87,11 @@ resource "google_cloud_run_v2_service" "translation_api_service" {
connector = "projects/${data.terraform_remote_state.holi_infra_state.outputs.shared_project_id}/locations/${local.default_region}/connectors/${data.terraform_remote_state.holi_infra_state.outputs.vpc_access_connector_name}"
egress = "ALL_TRAFFIC"
}
labels = {
"environment_type" = local.environment_type
"holi_service" = "translation-api"
}
}
traffic {
......
locals {
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"
dns_name = "${trimsuffix(substr(local.environment, 0, 34), ".-")}.${data.terraform_remote_state.holi_translation_api_common_state.outputs.dns_translation_api_domain}"
default_region = data.terraform_remote_state.holi_infra_state.outputs.default_region
}
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