From da71bf677da40a50089db0daf42bce763d9b4438 Mon Sep 17 00:00:00 2001 From: Drew Meyers Date: Wed, 28 Feb 2024 15:02:45 -0800 Subject: [PATCH] Add OGC API to outputs --- .../modules/terraform-unity-sps-airflow/README.md | 2 ++ .../modules/terraform-unity-sps-airflow/data.tf | 7 +++++++ .../modules/terraform-unity-sps-airflow/outputs.tf | 5 +++++ terraform-unity/outputs.tf | 3 ++- 4 files changed, 16 insertions(+), 1 deletion(-) diff --git a/terraform-unity/modules/terraform-unity-sps-airflow/README.md b/terraform-unity/modules/terraform-unity-sps-airflow/README.md index 91b29ead..d9bb68a3 100644 --- a/terraform-unity/modules/terraform-unity-sps-airflow/README.md +++ b/terraform-unity/modules/terraform-unity-sps-airflow/README.md @@ -60,6 +60,7 @@ No modules. | [aws_security_group.default](https://registry.terraform.io/providers/hashicorp/aws/5.35.0/docs/data-sources/security_group) | data source | | [aws_ssm_parameter.subnet_ids](https://registry.terraform.io/providers/hashicorp/aws/5.35.0/docs/data-sources/ssm_parameter) | data source | | [kubernetes_ingress_v1.airflow_ingress](https://registry.terraform.io/providers/hashicorp/kubernetes/2.25.2/docs/data-sources/ingress_v1) | data source | +| [kubernetes_ingress_v1.ogc_processes_api_ingress](https://registry.terraform.io/providers/hashicorp/kubernetes/2.25.2/docs/data-sources/ingress_v1) | data source | ## Inputs @@ -81,4 +82,5 @@ No modules. | Name | Description | |------|-------------| | [airflow\_webserver\_url](#output\_airflow\_webserver\_url) | The URL of the Airflow webserver service | +| [ogc\_processes\_api\_url](#output\_ogc\_processes\_api\_url) | The URL of the OGC Processes API service | diff --git a/terraform-unity/modules/terraform-unity-sps-airflow/data.tf b/terraform-unity/modules/terraform-unity-sps-airflow/data.tf index 9e780db5..668217fd 100644 --- a/terraform-unity/modules/terraform-unity-sps-airflow/data.tf +++ b/terraform-unity/modules/terraform-unity-sps-airflow/data.tf @@ -17,6 +17,13 @@ data "kubernetes_ingress_v1" "airflow_ingress" { } } +data "kubernetes_ingress_v1" "ogc_processes_api_ingress" { + metadata { + name = kubernetes_ingress_v1.ogc_processes_api_ingress.metadata[0].name + namespace = kubernetes_namespace.airflow.metadata[0].name + } +} + data "aws_eks_node_group" "default" { cluster_name = var.eks_cluster_name node_group_name = "defaultGroup" diff --git a/terraform-unity/modules/terraform-unity-sps-airflow/outputs.tf b/terraform-unity/modules/terraform-unity-sps-airflow/outputs.tf index 5f04471a..f8740a12 100644 --- a/terraform-unity/modules/terraform-unity-sps-airflow/outputs.tf +++ b/terraform-unity/modules/terraform-unity-sps-airflow/outputs.tf @@ -2,3 +2,8 @@ output "airflow_webserver_url" { description = "The URL of the Airflow webserver service" value = "http://${data.kubernetes_ingress_v1.airflow_ingress.status[0].load_balancer[0].ingress[0].hostname}:5000" } + +output "ogc_processes_api_url" { + description = "The URL of the OGC Processes API service" + value = "http://${data.kubernetes_ingress_v1.ogc_processes_api_ingress.status[0].load_balancer[0].ingress[0].hostname}:5001" +} diff --git a/terraform-unity/outputs.tf b/terraform-unity/outputs.tf index 5759eed8..75127946 100644 --- a/terraform-unity/outputs.tf +++ b/terraform-unity/outputs.tf @@ -1,6 +1,7 @@ output "load_balancer_hostnames" { description = "Load Balancer Ingress Hostnames" value = { - airflow = module.unity-sps-airflow.airflow_webserver_url + airflow = module.unity-sps-airflow.airflow_webserver_url + ogc_processes_api = module.unity-sps-airflow.ogc_processes_api_url } }