tf-gke-test/simple-template/outputs.tf

41 lines
1.1 KiB
Terraform
Raw Permalink Normal View History

2023-05-03 14:52:20 +02:00
output "region" {
description = "GCloud Region"
2024-05-05 11:35:15 +02:00
value = var.region
2023-05-03 14:52:20 +02:00
}
output "project" {
description = "GCloud Project ID"
2024-05-05 11:35:15 +02:00
value = var.project
2023-05-03 14:52:20 +02:00
}
output "zone" {
description = "GCloud Project ID"
value = var.zone
}
2023-05-03 14:52:20 +02:00
output "kubernetes_cluster_name" {
description = "GKE Cluster Name"
2024-05-05 11:35:15 +02:00
value = google_container_cluster.primary.name
2023-05-03 14:52:20 +02:00
}
output "kubernetes_cluster_host" {
description = "GKE Cluster Host"
2024-09-01 13:17:55 +02:00
sensitive = true
2024-05-05 11:35:15 +02:00
value = google_container_cluster.primary.endpoint
}
output "gcloud_gke_get_creds" {
description = "Command to get GKE credentials"
2024-09-01 13:17:55 +02:00
value = "gcloud container clusters get-credentials ${google_container_cluster.primary.name} --zone ${google_container_cluster.primary.location} --project ${var.project}"
2024-05-05 11:35:15 +02:00
}
output "gcloud_vpc_link" {
description = "VPC web ui link"
2024-05-05 12:06:11 +02:00
value = "https://console.cloud.google.com/networking/networks/list?project=${var.project}"
2024-05-05 11:35:15 +02:00
}
output "gcloud_gke_link" {
description = "GKE web ui link"
2024-09-01 13:17:55 +02:00
value = "https://console.cloud.google.com/kubernetes/clusters/details/${var.region}/${local.cluster_name}/details?project=${var.project}"
2023-05-03 14:52:20 +02:00
}