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+

modules/private-cluster/README.md

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

modules/private-cluster/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+

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ For simplicity, we suggest using `roles/container.admin` and
222222
| logging\_service | The logging service that the cluster should write logs to. Available options include logging.googleapis.com, logging.googleapis.com/kubernetes (beta), and none | string | `"logging.googleapis.com/kubernetes"` | no |
223223
| maintenance\_start\_time | Time window specified for daily maintenance operations in RFC3339 format | string | `"05:00"` | no |
224224
| master\_authorized\_networks | List of master authorized networks. If none are provided, disallow external access (except the cluster node IPs, which GKE automatically whitelists). | object | `<list>` | no |
225-
| master\_ipv4\_cidr\_block | (Beta) The IP range in CIDR notation to use for the hosted master network | string | `"10.0.0.0/28"` | no |
225+
| master\_ipv4\_cidr\_block | The IP range in CIDR notation to use for the hosted master network | string | `"10.0.0.0/28"` | no |
226226
| monitoring\_service | The monitoring service that the cluster should write metrics to. Automatically send metrics from pods in the cluster to the Google Cloud Monitoring API. VM metrics will be collected by Google Compute Engine regardless of this setting Available options include monitoring.googleapis.com, monitoring.googleapis.com/kubernetes (beta) and none | string | `"monitoring.googleapis.com/kubernetes"` | no |
227227
| name | The name of the cluster | string | n/a | yes |
228228
| network | The VPC network to host the cluster in | string | n/a | yes |
@@ -259,6 +259,7 @@ For simplicity, we suggest using `roles/container.admin` and
259259
| location | Cluster location (region if regional cluster, zone if zonal cluster) |
260260
| logging\_service | Logging service used |
261261
| master\_authorized\_networks\_config | Networks from which access to master is permitted |
262+
| master\_ipv4\_cidr\_block | The IP range in CIDR notation used for the hosted master network |
262263
| master\_version | Current master kubernetes version |
263264
| min\_master\_version | Minimum master kubernetes version |
264265
| monitoring\_service | Monitoring service used |

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

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+
}

modules/safer-cluster-update-variant/variables.tf

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/safer-cluster/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ For simplicity, we suggest using `roles/container.admin` and
222222
| logging\_service | The logging service that the cluster should write logs to. Available options include logging.googleapis.com, logging.googleapis.com/kubernetes (beta), and none | string | `"logging.googleapis.com/kubernetes"` | no |
223223
| maintenance\_start\_time | Time window specified for daily maintenance operations in RFC3339 format | string | `"05:00"` | no |
224224
| master\_authorized\_networks | List of master authorized networks. If none are provided, disallow external access (except the cluster node IPs, which GKE automatically whitelists). | object | `<list>` | no |
225-
| master\_ipv4\_cidr\_block | (Beta) The IP range in CIDR notation to use for the hosted master network | string | `"10.0.0.0/28"` | no |
225+
| master\_ipv4\_cidr\_block | The IP range in CIDR notation to use for the hosted master network | string | `"10.0.0.0/28"` | no |
226226
| monitoring\_service | The monitoring service that the cluster should write metrics to. Automatically send metrics from pods in the cluster to the Google Cloud Monitoring API. VM metrics will be collected by Google Compute Engine regardless of this setting Available options include monitoring.googleapis.com, monitoring.googleapis.com/kubernetes (beta) and none | string | `"monitoring.googleapis.com/kubernetes"` | no |
227227
| name | The name of the cluster | string | n/a | yes |
228228
| network | The VPC network to host the cluster in | string | n/a | yes |
@@ -259,6 +259,7 @@ For simplicity, we suggest using `roles/container.admin` and
259259
| location | Cluster location (region if regional cluster, zone if zonal cluster) |
260260
| logging\_service | Logging service used |
261261
| master\_authorized\_networks\_config | Networks from which access to master is permitted |
262+
| master\_ipv4\_cidr\_block | The IP range in CIDR notation used for the hosted master network |
262263
| master\_version | Current master kubernetes version |
263264
| min\_master\_version | Minimum master kubernetes version |
264265
| monitoring\_service | Monitoring service used |

modules/safer-cluster/outputs.tf

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+
}

modules/safer-cluster/variables.tf

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

outputs.tf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,4 +118,3 @@ 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-

0 commit comments

Comments
 (0)