Skip to content

Commit 2cc64c8

Browse files
authored
feat: Add master_ipv4_cidr_block output for private clusters (#427)
1 parent 064f308 commit 2cc64c8

File tree

19 files changed

+53
-7
lines changed

19 files changed

+53
-7
lines changed

autogen/main/outputs.tf.tmpl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,14 @@ output "service_account" {
118118
description = "The service account to default running nodes as if not overridden in `node_pools`."
119119
value = local.service_account
120120
}
121+
{% if private_cluster %}
121122

123+
output "master_ipv4_cidr_block" {
124+
description = "The IP range in CIDR notation used for the hosted master network"
125+
value = var.master_ipv4_cidr_block
126+
}
127+
128+
{% endif %}
122129
{% if beta_cluster %}
123130

124131
output "istio_enabled" {

autogen/safer-cluster/outputs.tf.tmpl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,3 +116,8 @@ output "service_account" {
116116
description = "The service account to default running nodes as if not overridden in `node_pools`."
117117
value = module.gke.service_account
118118
}
119+
120+
output "master_ipv4_cidr_block" {
121+
description = "The IP range in CIDR notation used for the hosted master network"
122+
value = var.master_ipv4_cidr_block
123+
}

autogen/safer-cluster/variables.tf.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ variable "cluster_resource_labels" {
228228

229229
variable "master_ipv4_cidr_block" {
230230
type = string
231-
description = "(Beta) The IP range in CIDR notation to use for the hosted master network"
231+
description = "The IP range in CIDR notation to use for the hosted master network"
232232
default = "10.0.0.0/28"
233233
}
234234

modules/beta-private-cluster-update-variant/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,7 @@ Then perform the following commands on the root folder:
239239
| location | Cluster location (region if regional cluster, zone if zonal cluster) |
240240
| logging\_service | Logging service used |
241241
| master\_authorized\_networks\_config | Networks from which access to master is permitted |
242+
| master\_ipv4\_cidr\_block | The IP range in CIDR notation used for the hosted master network |
242243
| master\_version | Current master kubernetes version |
243244
| min\_master\_version | Minimum master kubernetes version |
244245
| monitoring\_service | Monitoring service used |

modules/beta-private-cluster-update-variant/outputs.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,11 @@ output "service_account" {
119119
value = local.service_account
120120
}
121121

122+
output "master_ipv4_cidr_block" {
123+
description = "The IP range in CIDR notation used for the hosted master network"
124+
value = var.master_ipv4_cidr_block
125+
}
126+
122127

123128
output "istio_enabled" {
124129
description = "Whether Istio is enabled"

modules/beta-private-cluster/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,7 @@ Then perform the following commands on the root folder:
217217
| location | Cluster location (region if regional cluster, zone if zonal cluster) |
218218
| logging\_service | Logging service used |
219219
| master\_authorized\_networks\_config | Networks from which access to master is permitted |
220+
| master\_ipv4\_cidr\_block | The IP range in CIDR notation used for the hosted master network |
220221
| master\_version | Current master kubernetes version |
221222
| min\_master\_version | Minimum master kubernetes version |
222223
| monitoring\_service | Monitoring service used |

modules/beta-private-cluster/outputs.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,11 @@ output "service_account" {
119119
value = local.service_account
120120
}
121121

122+
output "master_ipv4_cidr_block" {
123+
description = "The IP range in CIDR notation used for the hosted master network"
124+
value = var.master_ipv4_cidr_block
125+
}
126+
122127

123128
output "istio_enabled" {
124129
description = "Whether Istio is enabled"

modules/beta-public-cluster/outputs.tf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,6 @@ output "service_account" {
119119
value = local.service_account
120120
}
121121

122-
123122
output "istio_enabled" {
124123
description = "Whether Istio is enabled"
125124
value = local.cluster_istio_enabled

modules/private-cluster-update-variant/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,7 @@ Then perform the following commands on the root folder:
213213
| location | Cluster location (region if regional cluster, zone if zonal cluster) |
214214
| logging\_service | Logging service used |
215215
| master\_authorized\_networks\_config | Networks from which access to master is permitted |
216+
| master\_ipv4\_cidr\_block | The IP range in CIDR notation used for the hosted master network |
216217
| master\_version | Current master kubernetes version |
217218
| min\_master\_version | Minimum master kubernetes version |
218219
| monitoring\_service | Monitoring service used |

modules/private-cluster-update-variant/outputs.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,3 +119,8 @@ output "service_account" {
119119
value = local.service_account
120120
}
121121

122+
output "master_ipv4_cidr_block" {
123+
description = "The IP range in CIDR notation used for the hosted master network"
124+
value = var.master_ipv4_cidr_block
125+
}
126+

0 commit comments

Comments
 (0)