Skip to content
Snippets Groups Projects
Commit 11fa9df9 authored by Daniel Bimschas's avatar Daniel Bimschas
Browse files

HOLI-9542: add terraform output for endpoint URL to be consumed by other services

parent 8b6ee273
No related branches found
No related tags found
No related merge requests found
...@@ -6,8 +6,3 @@ resource "google_dns_record_set" "holi_social_geo_api_domain_record_set" { ...@@ -6,8 +6,3 @@ resource "google_dns_record_set" "holi_social_geo_api_domain_record_set" {
ttl = 300 ttl = 300
rrdatas = [google_cloud_run_domain_mapping.holi_social_geo_api.status[0].resource_records[0].rrdata] rrdatas = [google_cloud_run_domain_mapping.holi_social_geo_api.status[0].resource_records[0].rrdata]
} }
output "api_domain" {
value = trimsuffix(google_dns_record_set.holi_social_geo_api_domain_record_set.name, ".")
description = "Domain where the api resides"
}
...@@ -6,5 +6,18 @@ locals { ...@@ -6,5 +6,18 @@ locals {
# the dns name can be at most 64 chars in total # the dns name can be at most 64 chars in total
dns_name = "${trimsuffix(substr(local.environment, 0, 34), ".-")}.${data.terraform_remote_state.holi_geo_api_common_state.outputs.dns_geo_api_domain}" dns_name = "${trimsuffix(substr(local.environment, 0, 34), ".-")}.${data.terraform_remote_state.holi_geo_api_common_state.outputs.dns_geo_api_domain}"
api_domain = trimsuffix(google_dns_record_set.holi_social_geo_api_domain_record_set.name, ".")
api_endpoint_url = "https://${local.api_domain}/graphql"
default_region = data.terraform_remote_state.holi_infra_state.outputs.default_region default_region = data.terraform_remote_state.holi_infra_state.outputs.default_region
} }
output "api_domain" {
value = local.api_domain
description = "Domain under which the GeoAPI runs"
}
output "api_endpoint_url" {
value = local.api_endpoint_url
description = "GraphQL API endpoint URL of the GeoAPI"
}
\ No newline at end of file
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