Skip to content

Commit

Permalink
fix: make master_ipv4_cidr_block optional for autopilot
Browse files Browse the repository at this point in the history
  • Loading branch information
cloud-pharaoh committed Mar 13, 2024
1 parent af354af commit 2903641
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 5 deletions.
1 change: 0 additions & 1 deletion examples/simple_autopilot_private/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ module "gke" {
enable_vertical_pod_autoscaling = true
enable_private_endpoint = true
enable_private_nodes = true
master_ipv4_cidr_block = "172.16.0.0/28"
network_tags = [local.cluster_type]
deletion_protection = false

Expand Down
1 change: 0 additions & 1 deletion examples/simple_autopilot_private_non_default_sa/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ module "gke" {
enable_vertical_pod_autoscaling = true
enable_private_endpoint = true
enable_private_nodes = true
master_ipv4_cidr_block = "172.16.0.0/28"
deletion_protection = false

master_authorized_networks = [
Expand Down
2 changes: 1 addition & 1 deletion modules/beta-autopilot-private-cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ Then perform the following commands on the root folder:
| maintenance\_start\_time | Time window specified for daily or recurring maintenance operations in RFC3339 format | `string` | `"05:00"` | no |
| master\_authorized\_networks | List of master authorized networks. If none are provided, disallow external access (except the cluster node IPs, which GKE automatically whitelists). | `list(object({ cidr_block = string, display_name = string }))` | `[]` | no |
| master\_global\_access\_enabled | Whether the cluster master is accessible globally (from any region) or only within the same region as the private endpoint. | `bool` | `true` | no |
| 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 |
| master\_ipv4\_cidr\_block | (Beta) The IP range in CIDR notation to use for the hosted master network. Optional for Autopilot clusters. | `string` | `null` | no |
| name | The name of the cluster (required) | `string` | n/a | yes |
| network | The VPC network to host the cluster in (required) | `string` | n/a | yes |
| network\_project\_id | The project ID of the shared VPC's host (for shared vpc support) | `string` | `""` | no |
Expand Down
4 changes: 2 additions & 2 deletions modules/beta-autopilot-private-cluster/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -283,8 +283,8 @@ variable "enable_private_nodes" {

variable "master_ipv4_cidr_block" {
type = string
description = "(Beta) The IP range in CIDR notation to use for the hosted master network"
default = "10.0.0.0/28"
description = "(Beta) The IP range in CIDR notation to use for the hosted master network. Optional for Autopilot clusters."
default = null
}

variable "master_global_access_enabled" {
Expand Down

0 comments on commit 2903641

Please sign in to comment.