Skip to content

Commit e504301

Browse files
authored
Merge pull request #381 from bharathkkb/feature/provider-update
Provider update 3.3.0
2 parents ec9cfe4 + 17e3e29 commit e504301

File tree

60 files changed

+75
-60
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+75
-60
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ Then perform the following commands on the root folder:
115115
|------|-------------|:----:|:-----:|:-----:|
116116
| basic\_auth\_password | The password to be used with Basic Authentication. | string | `""` | no |
117117
| 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 |
118-
| cluster\_ipv4\_cidr | The IP address range of the kubernetes pods in this cluster. Default is an automatically assigned CIDR. | string | `""` | no |
118+
| cluster\_ipv4\_cidr | The IP address range of the kubernetes pods in this cluster. Default is an automatically assigned CIDR. | string | `"null"` | no |
119119
| cluster\_resource\_labels | The GCE resource labels (a map of key/value pairs) to be applied to the cluster | map(string) | `<map>` | no |
120120
| 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 |
121121
| create\_service\_account | Defines if service account specified to run nodes should be created. | bool | `"true"` | no |

autogen/main.tf.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ locals {
137137
cluster_master_auth_map = local.cluster_master_auth_list_layer2[0]
138138

139139
cluster_location = google_container_cluster.primary.location
140-
cluster_region = var.regional ? google_container_cluster.primary.region : join("-", slice(split("-", local.cluster_location), 0, 2))
140+
cluster_region = var.regional ? var.region : join("-", slice(split("-", local.cluster_location), 0, 2))
141141
cluster_zones = sort(local.cluster_output_zones)
142142

143143
cluster_name = local.cluster_output_name

autogen/variables.tf.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ variable "issue_client_certificate" {
318318
}
319319

320320
variable "cluster_ipv4_cidr" {
321-
default = ""
321+
default = null
322322
description = "The IP address range of the kubernetes pods in this cluster. Default is an automatically assigned CIDR."
323323
}
324324

autogen/versions.tf.tmpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ terraform {
1919

2020
required_providers {
2121
{% if beta_cluster %}
22-
google-beta = "~> 2.18"
22+
google-beta = ">= 2.18, <4.0.0"
2323
{% else %}
24-
google = "~> 2.18"
24+
google = ">= 2.18, <4.0.0"
2525
{% endif %}
2626
}
2727
}

examples/deploy_service/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ locals {
1919
}
2020

2121
provider "google" {
22-
version = "~> 2.18.0"
22+
version = "~> 3.3.0"
2323
region = var.region
2424
}
2525

examples/disable_client_cert/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ locals {
1919
}
2020

2121
provider "google" {
22-
version = "~> 2.18.0"
22+
version = "~> 3.3.0"
2323
region = var.region
2424
}
2525

examples/node_pool/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ locals {
1919
}
2020

2121
provider "google-beta" {
22-
version = "~> 2.18.0"
22+
version = "~> 3.3.0"
2323
region = var.region
2424
}
2525

examples/node_pool_update_variant/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ locals {
1919
}
2020

2121
provider "google" {
22-
version = "~> 2.18.0"
22+
version = "~> 3.3.0"
2323
region = var.region
2424
}
2525

examples/node_pool_update_variant_beta/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ locals {
1919
}
2020

2121
provider "google-beta" {
22-
version = "~> 2.18.0"
22+
version = "~> 3.3.0"
2323
credentials = file(var.credentials_path)
2424
region = var.region
2525
}

examples/private_zonal_with_networking/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
module "gcp-network" {
1818
source = "terraform-google-modules/network/google"
19-
version = "~> 1.4.0"
19+
version = "~> 2.0"
2020
project_id = var.project_id
2121
network_name = var.network
2222

examples/regional_private_node_pool_oauth_scopes/network.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
module "gke-network" {
1818
source = "terraform-google-modules/network/google"
19-
version = "~> 1.5"
19+
version = "~> 2.0"
2020
project_id = var.project_id
2121
network_name = "random-gke-network"
2222

examples/regional_private_node_pool_oauth_scopes/provider.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
*/
1616

1717
provider "google" {
18-
version = "2.18.0"
18+
version = "3.3.0"
1919
}
2020

2121
provider "google-beta" {
22-
version = "2.18.0"
22+
version = "3.3.0"
2323
}

examples/safer_cluster/main.tf

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,18 @@ resource "random_string" "suffix" {
2323
locals {
2424
cluster_type = "safer-cluster"
2525
network_name = "safer-cluster-network-${random_string.suffix.result}"
26-
subnet_name = "safer-cluster-subnet-${random_string.suffix.result}"
27-
master_auth_subnetwork = "safer-cluster-master-subnet-${random_string.suffix.result}"
26+
subnet_name = "safer-cluster-subnet"
27+
master_auth_subnetwork = "safer-cluster-master-subnet"
2828
pods_range_name = "ip-range-pods-${random_string.suffix.result}"
2929
svc_range_name = "ip-range-svc-${random_string.suffix.result}"
3030
}
3131

3232
provider "google" {
33-
version = "~> 2.18.0"
33+
version = "~> 3.3.0"
3434
}
3535

3636
provider "google-beta" {
37-
version = "~> 2.18.0"
37+
version = "~> 3.3.0"
3838
}
3939

4040
module "gke" {
@@ -44,7 +44,7 @@ module "gke" {
4444
regional = true
4545
region = var.region
4646
network = module.gcp-network.network_name
47-
subnetwork = module.gcp-network.subnets_names[0]
47+
subnetwork = module.gcp-network.subnets_names[index(module.gcp-network.subnets_names, local.subnet_name)]
4848
ip_range_pods = local.pods_range_name
4949
ip_range_services = local.svc_range_name
5050
compute_engine_service_account = var.compute_engine_service_account

examples/safer_cluster/network.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
module "gcp-network" {
1818
source = "terraform-google-modules/network/google"
19-
version = "~> 1.4.0"
19+
version = "~> 2.0"
2020
project_id = var.project_id
2121
network_name = local.network_name
2222

examples/shared_vpc/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ locals {
1919
}
2020

2121
provider "google" {
22-
version = "~> 2.18.0"
22+
version = "~> 3.3.0"
2323
region = var.region
2424
}
2525

examples/simple_regional/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ locals {
1919
}
2020

2121
provider "google" {
22-
version = "~> 2.18.0"
22+
version = "~> 3.3.0"
2323
region = var.region
2424
}
2525

examples/simple_regional_beta/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ locals {
1919
}
2020

2121
provider "google-beta" {
22-
version = "~> 2.18.0"
22+
version = "~> 3.3.0"
2323
region = var.region
2424
}
2525

examples/simple_regional_private/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ locals {
1919
}
2020

2121
provider "google" {
22-
version = "~> 2.18.0"
22+
version = "~> 3.3.0"
2323
region = var.region
2424
}
2525

examples/simple_regional_private_beta/main.tf

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,13 @@ locals {
1818
cluster_type = "simple-regional-private-beta"
1919
}
2020

21+
provider "google" {
22+
version = "~> 3.3.0"
23+
region = var.region
24+
}
25+
2126
provider "google-beta" {
22-
version = "~> 2.18.0"
27+
version = "~> 3.3.0"
2328
region = var.region
2429
}
2530

examples/simple_regional_with_networking/main.tf

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,13 @@
1414
* limitations under the License.
1515
*/
1616

17+
provider "google" {
18+
version = "~> 3.3.0"
19+
}
20+
1721
module "gcp-network" {
1822
source = "terraform-google-modules/network/google"
19-
version = "~> 1.4.0"
23+
version = "~> 2.0"
2024
project_id = var.project_id
2125
network_name = var.network
2226

examples/simple_zonal_private/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ locals {
1919
}
2020

2121
provider "google" {
22-
version = "~> 2.18.0"
22+
version = "~> 3.3.0"
2323
region = var.region
2424
}
2525

examples/simple_zonal_with_acm/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ locals {
1919
}
2020

2121
provider "google" {
22-
version = "~> 2.18.0"
22+
version = "~> 3.3.0"
2323
region = var.region
2424
}
2525

examples/stub_domains/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ locals {
1919
}
2020

2121
provider "google" {
22-
version = "~> 2.18.0"
22+
version = "~> 3.3.0"
2323
region = var.region
2424
}
2525

examples/stub_domains_private/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616

1717
provider "google" {
18-
version = "~> 2.18.0"
18+
version = "~> 3.3.0"
1919
region = var.region
2020
}
2121

examples/stub_domains_upstream_nameservers/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ locals {
1919
}
2020

2121
provider "google" {
22-
version = "~> 2.18.0"
22+
version = "~> 3.3.0"
2323
region = var.region
2424
}
2525

examples/upstream_nameservers/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ locals {
1919
}
2020

2121
provider "google" {
22-
version = "~> 2.18.0"
22+
version = "~> 3.3.0"
2323
region = var.region
2424
}
2525

examples/workload_metadata_config/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ locals {
1919
}
2020

2121
provider "google-beta" {
22-
version = "~> 2.18.0"
22+
version = "~> 3.3.0"
2323
region = var.region
2424
}
2525

main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ locals {
9292
cluster_master_auth_map = local.cluster_master_auth_list_layer2[0]
9393

9494
cluster_location = google_container_cluster.primary.location
95-
cluster_region = var.regional ? google_container_cluster.primary.region : join("-", slice(split("-", local.cluster_location), 0, 2))
95+
cluster_region = var.regional ? var.region : join("-", slice(split("-", local.cluster_location), 0, 2))
9696
cluster_zones = sort(local.cluster_output_zones)
9797

9898
cluster_name = local.cluster_output_name

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ Then perform the following commands on the root folder:
137137
| 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 |
138138
| cloudrun | (Beta) Enable CloudRun addon | string | `"false"` | no |
139139
| 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 |
140-
| cluster\_ipv4\_cidr | The IP address range of the kubernetes pods in this cluster. Default is an automatically assigned CIDR. | string | `""` | no |
140+
| cluster\_ipv4\_cidr | The IP address range of the kubernetes pods in this cluster. Default is an automatically assigned CIDR. | string | `"null"` | no |
141141
| cluster\_resource\_labels | The GCE resource labels (a map of key/value pairs) to be applied to the cluster | map(string) | `<map>` | no |
142142
| 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 |
143143
| create\_service\_account | Defines if service account specified to run nodes should be created. | bool | `"true"` | no |

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ locals {
123123
cluster_master_auth_map = local.cluster_master_auth_list_layer2[0]
124124

125125
cluster_location = google_container_cluster.primary.location
126-
cluster_region = var.regional ? google_container_cluster.primary.region : join("-", slice(split("-", local.cluster_location), 0, 2))
126+
cluster_region = var.regional ? var.region : join("-", slice(split("-", local.cluster_location), 0, 2))
127127
cluster_zones = sort(local.cluster_output_zones)
128128

129129
cluster_name = local.cluster_output_name

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ variable "issue_client_certificate" {
316316
}
317317

318318
variable "cluster_ipv4_cidr" {
319-
default = ""
319+
default = null
320320
description = "The IP address range of the kubernetes pods in this cluster. Default is an automatically assigned CIDR."
321321
}
322322

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ terraform {
1818
required_version = ">= 0.12"
1919

2020
required_providers {
21-
google-beta = "~> 2.18"
21+
google-beta = ">= 2.18, <4.0.0"
2222
}
2323
}

modules/beta-private-cluster/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ Then perform the following commands on the root folder:
137137
| 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 |
138138
| cloudrun | (Beta) Enable CloudRun addon | string | `"false"` | no |
139139
| 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 |
140-
| cluster\_ipv4\_cidr | The IP address range of the kubernetes pods in this cluster. Default is an automatically assigned CIDR. | string | `""` | no |
140+
| cluster\_ipv4\_cidr | The IP address range of the kubernetes pods in this cluster. Default is an automatically assigned CIDR. | string | `"null"` | no |
141141
| cluster\_resource\_labels | The GCE resource labels (a map of key/value pairs) to be applied to the cluster | map(string) | `<map>` | no |
142142
| 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 |
143143
| create\_service\_account | Defines if service account specified to run nodes should be created. | bool | `"true"` | no |

modules/beta-private-cluster/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ locals {
123123
cluster_master_auth_map = local.cluster_master_auth_list_layer2[0]
124124

125125
cluster_location = google_container_cluster.primary.location
126-
cluster_region = var.regional ? google_container_cluster.primary.region : join("-", slice(split("-", local.cluster_location), 0, 2))
126+
cluster_region = var.regional ? var.region : join("-", slice(split("-", local.cluster_location), 0, 2))
127127
cluster_zones = sort(local.cluster_output_zones)
128128

129129
cluster_name = local.cluster_output_name

modules/beta-private-cluster/variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ variable "issue_client_certificate" {
316316
}
317317

318318
variable "cluster_ipv4_cidr" {
319-
default = ""
319+
default = null
320320
description = "The IP address range of the kubernetes pods in this cluster. Default is an automatically assigned CIDR."
321321
}
322322

modules/beta-private-cluster/versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ terraform {
1818
required_version = ">= 0.12"
1919

2020
required_providers {
21-
google-beta = "~> 2.18"
21+
google-beta = ">= 2.18, <4.0.0"
2222
}
2323
}

modules/beta-public-cluster/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ Then perform the following commands on the root folder:
121121
| 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 |
122122
| cloudrun | (Beta) Enable CloudRun addon | string | `"false"` | no |
123123
| 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 |
124-
| cluster\_ipv4\_cidr | The IP address range of the kubernetes pods in this cluster. Default is an automatically assigned CIDR. | string | `""` | no |
124+
| cluster\_ipv4\_cidr | The IP address range of the kubernetes pods in this cluster. Default is an automatically assigned CIDR. | string | `"null"` | no |
125125
| cluster\_resource\_labels | The GCE resource labels (a map of key/value pairs) to be applied to the cluster | map(string) | `<map>` | no |
126126
| 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 |
127127
| create\_service\_account | Defines if service account specified to run nodes should be created. | bool | `"true"` | no |

modules/beta-public-cluster/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ locals {
123123
cluster_master_auth_map = local.cluster_master_auth_list_layer2[0]
124124

125125
cluster_location = google_container_cluster.primary.location
126-
cluster_region = var.regional ? google_container_cluster.primary.region : join("-", slice(split("-", local.cluster_location), 0, 2))
126+
cluster_region = var.regional ? var.region : join("-", slice(split("-", local.cluster_location), 0, 2))
127127
cluster_zones = sort(local.cluster_output_zones)
128128

129129
cluster_name = local.cluster_output_name

modules/beta-public-cluster/variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ variable "issue_client_certificate" {
316316
}
317317

318318
variable "cluster_ipv4_cidr" {
319-
default = ""
319+
default = null
320320
description = "The IP address range of the kubernetes pods in this cluster. Default is an automatically assigned CIDR."
321321
}
322322

modules/beta-public-cluster/versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ terraform {
1818
required_version = ">= 0.12"
1919

2020
required_providers {
21-
google-beta = "~> 2.18"
21+
google-beta = ">= 2.18, <4.0.0"
2222
}
2323
}

0 commit comments

Comments
 (0)