Skip to content

Commit

Permalink
Merge pull request #214 from kevensen/output-updates
Browse files Browse the repository at this point in the history
Changed the endpoint variable to be dependent on GKE cluster state
  • Loading branch information
morgante authored Jul 23, 2019
2 parents 0895eee + 24a3681 commit 67f8a5f
Show file tree
Hide file tree
Showing 5 changed files with 68 additions and 0 deletions.
14 changes: 14 additions & 0 deletions autogen/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,18 @@ output "endpoint" {
sensitive = true
description = "Cluster endpoint"
value = local.cluster_endpoint
depends_on = [
/* Nominally, the endpoint is populated as soon as it is known to Terraform.
* However, the cluster may not be in a usable state yet. Therefore any
* resources dependent on the cluster being up will fail to deploy. With
* this explicit dependency, dependent resources can wait for the cluster
* to be up.
*/
google_container_cluster.primary,
google_container_node_pool.pools,
google_container_cluster.zonal_primary,
google_container_node_pool.zonal_pools,
]
}

output "min_master_version" {
Expand Down Expand Up @@ -112,6 +124,7 @@ output "service_account" {
description = "The service account to default running nodes as if not overridden in `node_pools`."
value = local.service_account
}

{% if beta_cluster %}

output "istio_enabled" {
Expand All @@ -128,4 +141,5 @@ output "pod_security_policy_enabled" {
description = "Whether pod security policy is enabled"
value = local.cluster_pod_security_policy_enabled
}

{% endif %}
14 changes: 14 additions & 0 deletions modules/beta-private-cluster/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,18 @@ output "endpoint" {
sensitive = true
description = "Cluster endpoint"
value = local.cluster_endpoint
depends_on = [
/* Nominally, the endpoint is populated as soon as it is known to Terraform.
* However, the cluster may not be in a usable state yet. Therefore any
* resources dependent on the cluster being up will fail to deploy. With
* this explicit dependency, dependent resources can wait for the cluster
* to be up.
*/
google_container_cluster.primary,
google_container_node_pool.pools,
google_container_cluster.zonal_primary,
google_container_node_pool.zonal_pools,
]
}

output "min_master_version" {
Expand Down Expand Up @@ -113,6 +125,7 @@ output "service_account" {
value = local.service_account
}


output "istio_enabled" {
description = "Whether Istio is enabled"
value = local.cluster_istio_enabled
Expand All @@ -127,3 +140,4 @@ output "pod_security_policy_enabled" {
description = "Whether pod security policy is enabled"
value = local.cluster_pod_security_policy_enabled
}

14 changes: 14 additions & 0 deletions modules/beta-public-cluster/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,18 @@ output "endpoint" {
sensitive = true
description = "Cluster endpoint"
value = local.cluster_endpoint
depends_on = [
/* Nominally, the endpoint is populated as soon as it is known to Terraform.
* However, the cluster may not be in a usable state yet. Therefore any
* resources dependent on the cluster being up will fail to deploy. With
* this explicit dependency, dependent resources can wait for the cluster
* to be up.
*/
google_container_cluster.primary,
google_container_node_pool.pools,
google_container_cluster.zonal_primary,
google_container_node_pool.zonal_pools,
]
}

output "min_master_version" {
Expand Down Expand Up @@ -113,6 +125,7 @@ output "service_account" {
value = local.service_account
}


output "istio_enabled" {
description = "Whether Istio is enabled"
value = local.cluster_istio_enabled
Expand All @@ -127,3 +140,4 @@ output "pod_security_policy_enabled" {
description = "Whether pod security policy is enabled"
value = local.cluster_pod_security_policy_enabled
}

13 changes: 13 additions & 0 deletions modules/private-cluster/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,18 @@ output "endpoint" {
sensitive = true
description = "Cluster endpoint"
value = local.cluster_endpoint
depends_on = [
/* Nominally, the endpoint is populated as soon as it is known to Terraform.
* However, the cluster may not be in a usable state yet. Therefore any
* resources dependent on the cluster being up will fail to deploy. With
* this explicit dependency, dependent resources can wait for the cluster
* to be up.
*/
google_container_cluster.primary,
google_container_node_pool.pools,
google_container_cluster.zonal_primary,
google_container_node_pool.zonal_pools,
]
}

output "min_master_version" {
Expand Down Expand Up @@ -112,3 +124,4 @@ output "service_account" {
description = "The service account to default running nodes as if not overridden in `node_pools`."
value = local.service_account
}

13 changes: 13 additions & 0 deletions outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,18 @@ output "endpoint" {
sensitive = true
description = "Cluster endpoint"
value = local.cluster_endpoint
depends_on = [
/* Nominally, the endpoint is populated as soon as it is known to Terraform.
* However, the cluster may not be in a usable state yet. Therefore any
* resources dependent on the cluster being up will fail to deploy. With
* this explicit dependency, dependent resources can wait for the cluster
* to be up.
*/
google_container_cluster.primary,
google_container_node_pool.pools,
google_container_cluster.zonal_primary,
google_container_node_pool.zonal_pools,
]
}

output "min_master_version" {
Expand Down Expand Up @@ -112,3 +124,4 @@ output "service_account" {
description = "The service account to default running nodes as if not overridden in `node_pools`."
value = local.service_account
}

0 comments on commit 67f8a5f

Please sign in to comment.