Skip to content

Commit

Permalink
Add OGC API to outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
Drew Meyers committed Feb 28, 2024
1 parent 07cb1a9 commit da71bf6
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 1 deletion.
2 changes: 2 additions & 0 deletions terraform-unity/modules/terraform-unity-sps-airflow/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -81,4 +82,5 @@ No modules.
| Name | Description |
|------|-------------|
| <a name="output_airflow_webserver_url"></a> [airflow\_webserver\_url](#output\_airflow\_webserver\_url) | The URL of the Airflow webserver service |
| <a name="output_ogc_processes_api_url"></a> [ogc\_processes\_api\_url](#output\_ogc\_processes\_api\_url) | The URL of the OGC Processes API service |
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
7 changes: 7 additions & 0 deletions terraform-unity/modules/terraform-unity-sps-airflow/data.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
3 changes: 2 additions & 1 deletion terraform-unity/outputs.tf
Original file line number Diff line number Diff line change
@@ -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
}
}

0 comments on commit da71bf6

Please sign in to comment.