Skip to content

Commit

Permalink
default cluster_ipv4_cidr to null, relax version constraints
Browse files Browse the repository at this point in the history
  • Loading branch information
bharathkkb committed Dec 27, 2019
1 parent 7da9cd1 commit 17e3e29
Show file tree
Hide file tree
Showing 27 changed files with 84 additions and 29 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ Then perform the following commands on the root folder:
|------|-------------|:----:|:-----:|:-----:|
| basic\_auth\_password | The password to be used with Basic Authentication. | string | `""` | no |
| basic\_auth\_username | The username to be used with Basic Authentication. An empty value will disable Basic Authentication, which is the recommended configuration. | string | `""` | no |
| cluster\_ipv4\_cidr | The IP address range of the kubernetes pods in this cluster. Default is an automatically assigned CIDR. | string | `"null"` | no |
| cluster\_resource\_labels | The GCE resource labels (a map of key/value pairs) to be applied to the cluster | map(string) | `<map>` | no |
| configure\_ip\_masq | Enables the installation of ip masquerading, which is usually no longer required when using aliasied IP addresses. IP masquerading uses a kubectl call, so when you have a private cluster, you will need access to the API server. | string | `"false"` | no |
| create\_service\_account | Defines if service account specified to run nodes should be created. | bool | `"true"` | no |
Expand Down
8 changes: 5 additions & 3 deletions autogen/cluster.tf.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,11 @@ resource "google_container_cluster" "primary" {
description = var.description
project = var.project_id
resource_labels = var.cluster_resource_labels
location = local.location
node_locations = local.node_locations
network = data.google_compute_network.gke_network.self_link

location = local.location
node_locations = local.node_locations
cluster_ipv4_cidr = var.cluster_ipv4_cidr
network = data.google_compute_network.gke_network.self_link

dynamic "network_policy" {
for_each = local.cluster_network_policy
Expand Down
5 changes: 5 additions & 0 deletions autogen/variables.tf.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,11 @@ variable "issue_client_certificate" {
default = false
}

variable "cluster_ipv4_cidr" {
default = null
description = "The IP address range of the kubernetes pods in this cluster. Default is an automatically assigned CIDR."
}

variable "cluster_resource_labels" {
type = map(string)
description = "The GCE resource labels (a map of key/value pairs) to be applied to the cluster"
Expand Down
4 changes: 2 additions & 2 deletions autogen/versions.tf.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ terraform {

required_providers {
{% if beta_cluster %}
google-beta = "~> 3.3.0"
google-beta = ">= 2.18, <4.0.0"
{% else %}
google = "~> 3.3.0"
google = ">= 2.18, <4.0.0"
{% endif %}
}
}
8 changes: 5 additions & 3 deletions cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,11 @@ resource "google_container_cluster" "primary" {
description = var.description
project = var.project_id
resource_labels = var.cluster_resource_labels
location = local.location
node_locations = local.node_locations
network = data.google_compute_network.gke_network.self_link

location = local.location
node_locations = local.node_locations
cluster_ipv4_cidr = var.cluster_ipv4_cidr
network = data.google_compute_network.gke_network.self_link

dynamic "network_policy" {
for_each = local.cluster_network_policy
Expand Down
1 change: 1 addition & 0 deletions modules/beta-private-cluster-update-variant/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ Then perform the following commands on the root folder:
| basic\_auth\_username | The username to be used with Basic Authentication. An empty value will disable Basic Authentication, which is the recommended configuration. | string | `""` | no |
| cloudrun | (Beta) Enable CloudRun addon | string | `"false"` | no |
| cluster\_autoscaling | Cluster autoscaling configuration. See [more details](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1beta1/projects.locations.clusters#clusterautoscaling) | object | `<map>` | no |
| cluster\_ipv4\_cidr | The IP address range of the kubernetes pods in this cluster. Default is an automatically assigned CIDR. | string | `"null"` | no |
| cluster\_resource\_labels | The GCE resource labels (a map of key/value pairs) to be applied to the cluster | map(string) | `<map>` | no |
| configure\_ip\_masq | Enables the installation of ip masquerading, which is usually no longer required when using aliasied IP addresses. IP masquerading uses a kubectl call, so when you have a private cluster, you will need access to the API server. | string | `"false"` | no |
| create\_service\_account | Defines if service account specified to run nodes should be created. | bool | `"true"` | no |
Expand Down
8 changes: 5 additions & 3 deletions modules/beta-private-cluster-update-variant/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,11 @@ resource "google_container_cluster" "primary" {
description = var.description
project = var.project_id
resource_labels = var.cluster_resource_labels
location = local.location
node_locations = local.node_locations
network = data.google_compute_network.gke_network.self_link

location = local.location
node_locations = local.node_locations
cluster_ipv4_cidr = var.cluster_ipv4_cidr
network = data.google_compute_network.gke_network.self_link

dynamic "network_policy" {
for_each = local.cluster_network_policy
Expand Down
5 changes: 5 additions & 0 deletions modules/beta-private-cluster-update-variant/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,11 @@ variable "issue_client_certificate" {
default = false
}

variable "cluster_ipv4_cidr" {
default = null
description = "The IP address range of the kubernetes pods in this cluster. Default is an automatically assigned CIDR."
}

variable "cluster_resource_labels" {
type = map(string)
description = "The GCE resource labels (a map of key/value pairs) to be applied to the cluster"
Expand Down
2 changes: 1 addition & 1 deletion modules/beta-private-cluster-update-variant/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ terraform {
required_version = ">= 0.12"

required_providers {
google-beta = "~> 3.3.0"
google-beta = ">= 2.18, <4.0.0"
}
}
1 change: 1 addition & 0 deletions modules/beta-private-cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ Then perform the following commands on the root folder:
| basic\_auth\_username | The username to be used with Basic Authentication. An empty value will disable Basic Authentication, which is the recommended configuration. | string | `""` | no |
| cloudrun | (Beta) Enable CloudRun addon | string | `"false"` | no |
| cluster\_autoscaling | Cluster autoscaling configuration. See [more details](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1beta1/projects.locations.clusters#clusterautoscaling) | object | `<map>` | no |
| cluster\_ipv4\_cidr | The IP address range of the kubernetes pods in this cluster. Default is an automatically assigned CIDR. | string | `"null"` | no |
| cluster\_resource\_labels | The GCE resource labels (a map of key/value pairs) to be applied to the cluster | map(string) | `<map>` | no |
| configure\_ip\_masq | Enables the installation of ip masquerading, which is usually no longer required when using aliasied IP addresses. IP masquerading uses a kubectl call, so when you have a private cluster, you will need access to the API server. | string | `"false"` | no |
| create\_service\_account | Defines if service account specified to run nodes should be created. | bool | `"true"` | no |
Expand Down
8 changes: 5 additions & 3 deletions modules/beta-private-cluster/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,11 @@ resource "google_container_cluster" "primary" {
description = var.description
project = var.project_id
resource_labels = var.cluster_resource_labels
location = local.location
node_locations = local.node_locations
network = data.google_compute_network.gke_network.self_link

location = local.location
node_locations = local.node_locations
cluster_ipv4_cidr = var.cluster_ipv4_cidr
network = data.google_compute_network.gke_network.self_link

dynamic "network_policy" {
for_each = local.cluster_network_policy
Expand Down
5 changes: 5 additions & 0 deletions modules/beta-private-cluster/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,11 @@ variable "issue_client_certificate" {
default = false
}

variable "cluster_ipv4_cidr" {
default = null
description = "The IP address range of the kubernetes pods in this cluster. Default is an automatically assigned CIDR."
}

variable "cluster_resource_labels" {
type = map(string)
description = "The GCE resource labels (a map of key/value pairs) to be applied to the cluster"
Expand Down
2 changes: 1 addition & 1 deletion modules/beta-private-cluster/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ terraform {
required_version = ">= 0.12"

required_providers {
google-beta = "~> 3.3.0"
google-beta = ">= 2.18, <4.0.0"
}
}
1 change: 1 addition & 0 deletions modules/beta-public-cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ Then perform the following commands on the root folder:
| basic\_auth\_username | The username to be used with Basic Authentication. An empty value will disable Basic Authentication, which is the recommended configuration. | string | `""` | no |
| cloudrun | (Beta) Enable CloudRun addon | string | `"false"` | no |
| cluster\_autoscaling | Cluster autoscaling configuration. See [more details](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1beta1/projects.locations.clusters#clusterautoscaling) | object | `<map>` | no |
| cluster\_ipv4\_cidr | The IP address range of the kubernetes pods in this cluster. Default is an automatically assigned CIDR. | string | `"null"` | no |
| cluster\_resource\_labels | The GCE resource labels (a map of key/value pairs) to be applied to the cluster | map(string) | `<map>` | no |
| configure\_ip\_masq | Enables the installation of ip masquerading, which is usually no longer required when using aliasied IP addresses. IP masquerading uses a kubectl call, so when you have a private cluster, you will need access to the API server. | string | `"false"` | no |
| create\_service\_account | Defines if service account specified to run nodes should be created. | bool | `"true"` | no |
Expand Down
8 changes: 5 additions & 3 deletions modules/beta-public-cluster/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,11 @@ resource "google_container_cluster" "primary" {
description = var.description
project = var.project_id
resource_labels = var.cluster_resource_labels
location = local.location
node_locations = local.node_locations
network = data.google_compute_network.gke_network.self_link

location = local.location
node_locations = local.node_locations
cluster_ipv4_cidr = var.cluster_ipv4_cidr
network = data.google_compute_network.gke_network.self_link

dynamic "network_policy" {
for_each = local.cluster_network_policy
Expand Down
5 changes: 5 additions & 0 deletions modules/beta-public-cluster/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,11 @@ variable "issue_client_certificate" {
default = false
}

variable "cluster_ipv4_cidr" {
default = null
description = "The IP address range of the kubernetes pods in this cluster. Default is an automatically assigned CIDR."
}

variable "cluster_resource_labels" {
type = map(string)
description = "The GCE resource labels (a map of key/value pairs) to be applied to the cluster"
Expand Down
2 changes: 1 addition & 1 deletion modules/beta-public-cluster/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ terraform {
required_version = ">= 0.12"

required_providers {
google-beta = "~> 3.3.0"
google-beta = ">= 2.18, <4.0.0"
}
}
1 change: 1 addition & 0 deletions modules/private-cluster-update-variant/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ Then perform the following commands on the root folder:
|------|-------------|:----:|:-----:|:-----:|
| basic\_auth\_password | The password to be used with Basic Authentication. | string | `""` | no |
| basic\_auth\_username | The username to be used with Basic Authentication. An empty value will disable Basic Authentication, which is the recommended configuration. | string | `""` | no |
| cluster\_ipv4\_cidr | The IP address range of the kubernetes pods in this cluster. Default is an automatically assigned CIDR. | string | `"null"` | no |
| cluster\_resource\_labels | The GCE resource labels (a map of key/value pairs) to be applied to the cluster | map(string) | `<map>` | no |
| configure\_ip\_masq | Enables the installation of ip masquerading, which is usually no longer required when using aliasied IP addresses. IP masquerading uses a kubectl call, so when you have a private cluster, you will need access to the API server. | string | `"false"` | no |
| create\_service\_account | Defines if service account specified to run nodes should be created. | bool | `"true"` | no |
Expand Down
8 changes: 5 additions & 3 deletions modules/private-cluster-update-variant/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,11 @@ resource "google_container_cluster" "primary" {
description = var.description
project = var.project_id
resource_labels = var.cluster_resource_labels
location = local.location
node_locations = local.node_locations
network = data.google_compute_network.gke_network.self_link

location = local.location
node_locations = local.node_locations
cluster_ipv4_cidr = var.cluster_ipv4_cidr
network = data.google_compute_network.gke_network.self_link

dynamic "network_policy" {
for_each = local.cluster_network_policy
Expand Down
5 changes: 5 additions & 0 deletions modules/private-cluster-update-variant/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,11 @@ variable "issue_client_certificate" {
default = false
}

variable "cluster_ipv4_cidr" {
default = null
description = "The IP address range of the kubernetes pods in this cluster. Default is an automatically assigned CIDR."
}

variable "cluster_resource_labels" {
type = map(string)
description = "The GCE resource labels (a map of key/value pairs) to be applied to the cluster"
Expand Down
2 changes: 1 addition & 1 deletion modules/private-cluster-update-variant/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ terraform {
required_version = ">= 0.12"

required_providers {
google = "~> 3.3.0"
google = ">= 2.18, <4.0.0"
}
}
1 change: 1 addition & 0 deletions modules/private-cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ Then perform the following commands on the root folder:
|------|-------------|:----:|:-----:|:-----:|
| basic\_auth\_password | The password to be used with Basic Authentication. | string | `""` | no |
| basic\_auth\_username | The username to be used with Basic Authentication. An empty value will disable Basic Authentication, which is the recommended configuration. | string | `""` | no |
| cluster\_ipv4\_cidr | The IP address range of the kubernetes pods in this cluster. Default is an automatically assigned CIDR. | string | `"null"` | no |
| cluster\_resource\_labels | The GCE resource labels (a map of key/value pairs) to be applied to the cluster | map(string) | `<map>` | no |
| configure\_ip\_masq | Enables the installation of ip masquerading, which is usually no longer required when using aliasied IP addresses. IP masquerading uses a kubectl call, so when you have a private cluster, you will need access to the API server. | string | `"false"` | no |
| create\_service\_account | Defines if service account specified to run nodes should be created. | bool | `"true"` | no |
Expand Down
8 changes: 5 additions & 3 deletions modules/private-cluster/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,11 @@ resource "google_container_cluster" "primary" {
description = var.description
project = var.project_id
resource_labels = var.cluster_resource_labels
location = local.location
node_locations = local.node_locations
network = data.google_compute_network.gke_network.self_link

location = local.location
node_locations = local.node_locations
cluster_ipv4_cidr = var.cluster_ipv4_cidr
network = data.google_compute_network.gke_network.self_link

dynamic "network_policy" {
for_each = local.cluster_network_policy
Expand Down
5 changes: 5 additions & 0 deletions modules/private-cluster/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,11 @@ variable "issue_client_certificate" {
default = false
}

variable "cluster_ipv4_cidr" {
default = null
description = "The IP address range of the kubernetes pods in this cluster. Default is an automatically assigned CIDR."
}

variable "cluster_resource_labels" {
type = map(string)
description = "The GCE resource labels (a map of key/value pairs) to be applied to the cluster"
Expand Down
2 changes: 1 addition & 1 deletion modules/private-cluster/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ terraform {
required_version = ">= 0.12"

required_providers {
google = "~> 3.3.0"
google = ">= 2.18, <4.0.0"
}
}
5 changes: 5 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,11 @@ variable "issue_client_certificate" {
default = false
}

variable "cluster_ipv4_cidr" {
default = null
description = "The IP address range of the kubernetes pods in this cluster. Default is an automatically assigned CIDR."
}

variable "cluster_resource_labels" {
type = map(string)
description = "The GCE resource labels (a map of key/value pairs) to be applied to the cluster"
Expand Down
2 changes: 1 addition & 1 deletion versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ terraform {
required_version = ">= 0.12"

required_providers {
google = "~> 3.3.0"
google = ">= 2.18, <4.0.0"
}
}

0 comments on commit 17e3e29

Please sign in to comment.