Skip to content
Snippets Groups Projects
Commit 2749b1e4 authored by Gregor Schulz's avatar Gregor Schulz
Browse files

add events tf state references to fwd api url

parent ec7a264a
No related branches found
No related tags found
Loading
...@@ -71,6 +71,10 @@ resource "google_cloud_run_service" "unified_api" { ...@@ -71,6 +71,10 @@ resource "google_cloud_run_service" "unified_api" {
name = "GEO_API_URL" name = "GEO_API_URL"
value = local.geo_api_url value = local.geo_api_url
} }
env {
name = "EVENTS_API_URL"
value = local.events_api_url
}
env { env {
name = "VOLUNTEERING_API_URL" name = "VOLUNTEERING_API_URL"
value = local.volunteering_api_url value = local.volunteering_api_url
......
...@@ -73,6 +73,14 @@ data "terraform_remote_state" "holi_volunteering_api_common_state" { ...@@ -73,6 +73,14 @@ data "terraform_remote_state" "holi_volunteering_api_common_state" {
} }
} }
data "terraform_remote_state" "holi_events_common_state" {
backend = "gcs"
config = {
bucket = "holi-shared-terraform-state"
prefix = "events-common"
}
}
data "terraform_remote_state" "holi_notifications_api_common_state" { data "terraform_remote_state" "holi_notifications_api_common_state" {
backend = "gcs" backend = "gcs"
config = { config = {
......
...@@ -17,6 +17,7 @@ locals { ...@@ -17,6 +17,7 @@ locals {
goodnews_api_url = "https://${local.environment == "production" ? "production" : "staging"}.${data.terraform_remote_state.holi_goodnews_api_common_state.outputs.dns_goodnews_api_domain}/graphql" goodnews_api_url = "https://${local.environment == "production" ? "production" : "staging"}.${data.terraform_remote_state.holi_goodnews_api_common_state.outputs.dns_goodnews_api_domain}/graphql"
geo_api_url = "https://${local.environment == "production" ? "production" : "staging"}.${data.terraform_remote_state.holi_geo_api_common_state.outputs.dns_geo_api_domain}/graphql" geo_api_url = "https://${local.environment == "production" ? "production" : "staging"}.${data.terraform_remote_state.holi_geo_api_common_state.outputs.dns_geo_api_domain}/graphql"
volunteering_api_url = "https://${local.environment == "production" ? "production" : "staging"}.${data.terraform_remote_state.holi_volunteering_api_common_state.outputs.dns_volunteering_api_domain}/graphql" volunteering_api_url = "https://${local.environment == "production" ? "production" : "staging"}.${data.terraform_remote_state.holi_volunteering_api_common_state.outputs.dns_volunteering_api_domain}/graphql"
events_api_url = "https://${local.environment == "production" ? "production" : "staging"}.${data.terraform_remote_state.holi_events_common_state.outputs.dns_events_domain}/graphql"
notifications_api_url = "https://${local.environment == "production" ? "production" : "staging"}.${data.terraform_remote_state.holi_notifications_api_common_state.outputs.dns_notifications_api_domain}/graphql" notifications_api_url = "https://${local.environment == "production" ? "production" : "staging"}.${data.terraform_remote_state.holi_notifications_api_common_state.outputs.dns_notifications_api_domain}/graphql"
translation_api_url = "https://${local.environment == "production" ? "production" : "staging"}.${data.terraform_remote_state.holi_translation_api_common_state.outputs.dns_translation_api_domain}/graphql" translation_api_url = "https://${local.environment == "production" ? "production" : "staging"}.${data.terraform_remote_state.holi_translation_api_common_state.outputs.dns_translation_api_domain}/graphql"
moderation_backend_url = "https://${data.terraform_remote_state.holi_moderation_environment_state.outputs.backend_domain}/graphql" moderation_backend_url = "https://${data.terraform_remote_state.holi_moderation_environment_state.outputs.backend_domain}/graphql"
...@@ -47,6 +48,10 @@ output "volunteering_api_url" { ...@@ -47,6 +48,10 @@ output "volunteering_api_url" {
value = local.volunteering_api_url value = local.volunteering_api_url
} }
output "events_api_url" {
value = local.events_api_url
}
output "notifications_api_url" { output "notifications_api_url" {
value = local.notifications_api_url value = local.notifications_api_url
} }
...@@ -59,7 +64,6 @@ output "moderation_backend_url" { ...@@ -59,7 +64,6 @@ output "moderation_backend_url" {
value = local.moderation_backend_url value = local.moderation_backend_url
} }
output "api_domain" { output "api_domain" {
value = local.api_domain value = local.api_domain
description = "Domain under which the unified API runs" description = "Domain under which the unified API runs"
......
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