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

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

parent cfdef641
No related branches found
No related tags found
No related merge requests found
......@@ -82,6 +82,10 @@ resource "google_cloud_run_service" "donations_api" {
# 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 = {
"environment_type" = local.environment_type
"holi_service" = "app-donations"
}
}
}
......
......@@ -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
dns_name = "${trimsuffix(substr(local.environment, 0, 34), ".-")}.${data.terraform_remote_state.holi_donations_api_common_state.outputs.dns_donations_api_domain}"
......
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