Skip to content

Commit ff6b5cc

Browse files
authored
feat: Add peering_name output for private clusters and increase minimum provider version to 3.14 (#484)
1 parent 07de70b commit ff6b5cc

File tree

44 files changed

+89
-28
lines changed

Some content is hidden

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

44 files changed

+89
-28
lines changed

autogen/main/main.tf.tmpl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,8 @@ locals {
106106
cluster_output_zones = local.cluster_output_regional_zones
107107

108108
{% if private_cluster %}
109-
cluster_endpoint = (var.enable_private_nodes && length(google_container_cluster.primary.private_cluster_config) > 0) ? (var.deploy_using_private_endpoint ? google_container_cluster.primary.private_cluster_config.0.private_endpoint : google_container_cluster.primary.private_cluster_config.0.public_endpoint) : google_container_cluster.primary.endpoint
109+
cluster_endpoint = (var.enable_private_nodes && length(google_container_cluster.primary.private_cluster_config) > 0) ? (var.deploy_using_private_endpoint ? google_container_cluster.primary.private_cluster_config.0.private_endpoint : google_container_cluster.primary.private_cluster_config.0.public_endpoint) : google_container_cluster.primary.endpoint
110+
cluster_peering_name = (var.enable_private_nodes && length(google_container_cluster.primary.private_cluster_config) > 0) ? google_container_cluster.primary.private_cluster_config.0.peering_name : null
110111
{% else %}
111112
cluster_endpoint = google_container_cluster.primary.endpoint
112113
{% endif %}

autogen/main/outputs.tf.tmpl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,10 @@ output "master_ipv4_cidr_block" {
125125
value = var.master_ipv4_cidr_block
126126
}
127127

128+
output "peering_name" {
129+
description = "The name of the peering between this cluster and the Google owned VPC."
130+
value = local.cluster_peering_name
131+
}
128132
{% endif %}
129133
{% if beta_cluster %}
130134

autogen/safer-cluster/outputs.tf.tmpl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,3 +121,8 @@ output "master_ipv4_cidr_block" {
121121
description = "The IP range in CIDR notation used for the hosted master network"
122122
value = var.master_ipv4_cidr_block
123123
}
124+
125+
output "peering_name" {
126+
description = "The name of the peering between this cluster and the Google owned VPC."
127+
value = module.gke.peering_name
128+
}

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 = "~> 3.3.0"
22+
version = "~> 3.14.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 = "~> 3.3.0"
22+
version = "~> 3.14.0"
2323
region = var.region
2424
}
2525

examples/private_zonal_with_networking/outputs.tf

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,7 @@ output "subnet_secondary_ranges" {
5656
value = module.gcp-network.subnets_secondary_ranges
5757
}
5858

59-
59+
output "peering_name" {
60+
description = "The name of the peering between this cluster and the Google owned VPC."
61+
value = module.gke.peering_name
62+
}

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 = "3.3.0"
18+
version = "3.14.0"
1919
}
2020

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

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 = "~> 3.3.0"
22+
version = "~> 3.14.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 = "~> 3.3.0"
22+
version = "~> 3.14.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 = "~> 3.3.0"
22+
version = "~> 3.14.0"
2323
region = var.region
2424
}
2525

examples/simple_regional_with_networking/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 = "~> 3.3.0"
18+
version = "~> 3.14.0"
1919
}
2020

2121
module "gcp-network" {

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 = "~> 3.3.0"
22+
version = "~> 3.14.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 = "~> 3.3.0"
22+
version = "~> 3.14.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 = "~> 3.3.0"
22+
version = "~> 3.14.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 = "~> 3.3.0"
18+
version = "~> 3.14.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 = "~> 3.3.0"
22+
version = "~> 3.14.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 = "~> 3.3.0"
22+
version = "~> 3.14.0"
2323
region = var.region
2424
}
2525

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

Lines changed: 1 addition & 0 deletions

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,8 @@ locals {
9797
cluster_output_zonal_zones = local.zone_count > 1 ? slice(var.zones, 1, local.zone_count) : []
9898
cluster_output_zones = local.cluster_output_regional_zones
9999

100-
cluster_endpoint = (var.enable_private_nodes && length(google_container_cluster.primary.private_cluster_config) > 0) ? (var.deploy_using_private_endpoint ? google_container_cluster.primary.private_cluster_config.0.private_endpoint : google_container_cluster.primary.private_cluster_config.0.public_endpoint) : google_container_cluster.primary.endpoint
100+
cluster_endpoint = (var.enable_private_nodes && length(google_container_cluster.primary.private_cluster_config) > 0) ? (var.deploy_using_private_endpoint ? google_container_cluster.primary.private_cluster_config.0.private_endpoint : google_container_cluster.primary.private_cluster_config.0.public_endpoint) : google_container_cluster.primary.endpoint
101+
cluster_peering_name = (var.enable_private_nodes && length(google_container_cluster.primary.private_cluster_config) > 0) ? google_container_cluster.primary.private_cluster_config.0.peering_name : null
101102

102103
cluster_output_master_auth = concat(google_container_cluster.primary.*.master_auth, [])
103104
cluster_output_master_version = google_container_cluster.primary.master_version

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,10 @@ output "master_ipv4_cidr_block" {
124124
value = var.master_ipv4_cidr_block
125125
}
126126

127+
output "peering_name" {
128+
description = "The name of the peering between this cluster and the Google owned VPC."
129+
value = local.cluster_peering_name
130+
}
127131

128132
output "istio_enabled" {
129133
description = "Whether Istio is enabled"

modules/beta-private-cluster/README.md

Lines changed: 1 addition & 0 deletions

modules/beta-private-cluster/main.tf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,8 @@ locals {
9797
cluster_output_zonal_zones = local.zone_count > 1 ? slice(var.zones, 1, local.zone_count) : []
9898
cluster_output_zones = local.cluster_output_regional_zones
9999

100-
cluster_endpoint = (var.enable_private_nodes && length(google_container_cluster.primary.private_cluster_config) > 0) ? (var.deploy_using_private_endpoint ? google_container_cluster.primary.private_cluster_config.0.private_endpoint : google_container_cluster.primary.private_cluster_config.0.public_endpoint) : google_container_cluster.primary.endpoint
100+
cluster_endpoint = (var.enable_private_nodes && length(google_container_cluster.primary.private_cluster_config) > 0) ? (var.deploy_using_private_endpoint ? google_container_cluster.primary.private_cluster_config.0.private_endpoint : google_container_cluster.primary.private_cluster_config.0.public_endpoint) : google_container_cluster.primary.endpoint
101+
cluster_peering_name = (var.enable_private_nodes && length(google_container_cluster.primary.private_cluster_config) > 0) ? google_container_cluster.primary.private_cluster_config.0.peering_name : null
101102

102103
cluster_output_master_auth = concat(google_container_cluster.primary.*.master_auth, [])
103104
cluster_output_master_version = google_container_cluster.primary.master_version

modules/beta-private-cluster/outputs.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,10 @@ output "master_ipv4_cidr_block" {
124124
value = var.master_ipv4_cidr_block
125125
}
126126

127+
output "peering_name" {
128+
description = "The name of the peering between this cluster and the Google owned VPC."
129+
value = local.cluster_peering_name
130+
}
127131

128132
output "istio_enabled" {
129133
description = "Whether Istio is enabled"

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

Lines changed: 1 addition & 0 deletions

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@ locals {
7373
cluster_output_zonal_zones = local.zone_count > 1 ? slice(var.zones, 1, local.zone_count) : []
7474
cluster_output_zones = local.cluster_output_regional_zones
7575

76-
cluster_endpoint = (var.enable_private_nodes && length(google_container_cluster.primary.private_cluster_config) > 0) ? (var.deploy_using_private_endpoint ? google_container_cluster.primary.private_cluster_config.0.private_endpoint : google_container_cluster.primary.private_cluster_config.0.public_endpoint) : google_container_cluster.primary.endpoint
76+
cluster_endpoint = (var.enable_private_nodes && length(google_container_cluster.primary.private_cluster_config) > 0) ? (var.deploy_using_private_endpoint ? google_container_cluster.primary.private_cluster_config.0.private_endpoint : google_container_cluster.primary.private_cluster_config.0.public_endpoint) : google_container_cluster.primary.endpoint
77+
cluster_peering_name = (var.enable_private_nodes && length(google_container_cluster.primary.private_cluster_config) > 0) ? google_container_cluster.primary.private_cluster_config.0.peering_name : null
7778

7879
cluster_output_master_auth = concat(google_container_cluster.primary.*.master_auth, [])
7980
cluster_output_master_version = google_container_cluster.primary.master_version

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,3 +124,7 @@ output "master_ipv4_cidr_block" {
124124
value = var.master_ipv4_cidr_block
125125
}
126126

127+
output "peering_name" {
128+
description = "The name of the peering between this cluster and the Google owned VPC."
129+
value = local.cluster_peering_name
130+
}

modules/private-cluster/README.md

Lines changed: 1 addition & 0 deletions

modules/private-cluster/main.tf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@ locals {
7373
cluster_output_zonal_zones = local.zone_count > 1 ? slice(var.zones, 1, local.zone_count) : []
7474
cluster_output_zones = local.cluster_output_regional_zones
7575

76-
cluster_endpoint = (var.enable_private_nodes && length(google_container_cluster.primary.private_cluster_config) > 0) ? (var.deploy_using_private_endpoint ? google_container_cluster.primary.private_cluster_config.0.private_endpoint : google_container_cluster.primary.private_cluster_config.0.public_endpoint) : google_container_cluster.primary.endpoint
76+
cluster_endpoint = (var.enable_private_nodes && length(google_container_cluster.primary.private_cluster_config) > 0) ? (var.deploy_using_private_endpoint ? google_container_cluster.primary.private_cluster_config.0.private_endpoint : google_container_cluster.primary.private_cluster_config.0.public_endpoint) : google_container_cluster.primary.endpoint
77+
cluster_peering_name = (var.enable_private_nodes && length(google_container_cluster.primary.private_cluster_config) > 0) ? google_container_cluster.primary.private_cluster_config.0.peering_name : null
7778

7879
cluster_output_master_auth = concat(google_container_cluster.primary.*.master_auth, [])
7980
cluster_output_master_version = google_container_cluster.primary.master_version

modules/private-cluster/outputs.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,3 +124,7 @@ output "master_ipv4_cidr_block" {
124124
value = var.master_ipv4_cidr_block
125125
}
126126

127+
output "peering_name" {
128+
description = "The name of the peering between this cluster and the Google owned VPC."
129+
value = local.cluster_peering_name
130+
}

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

Lines changed: 1 addition & 0 deletions

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,3 +121,8 @@ output "master_ipv4_cidr_block" {
121121
description = "The IP range in CIDR notation used for the hosted master network"
122122
value = var.master_ipv4_cidr_block
123123
}
124+
125+
output "peering_name" {
126+
description = "The name of the peering between this cluster and the Google owned VPC."
127+
value = module.gke.peering_name
128+
}

modules/safer-cluster/README.md

Lines changed: 1 addition & 0 deletions

modules/safer-cluster/outputs.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,3 +121,8 @@ output "master_ipv4_cidr_block" {
121121
description = "The IP range in CIDR notation used for the hosted master network"
122122
value = var.master_ipv4_cidr_block
123123
}
124+
125+
output "peering_name" {
126+
description = "The name of the peering between this cluster and the Google owned VPC."
127+
value = module.gke.peering_name
128+
}

test/fixtures/deploy_service/network.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ resource "random_string" "suffix" {
2121
}
2222

2323
provider "google" {
24-
version = "~> 3.3.0"
24+
version = "~> 3.14.0"
2525
project = var.project_ids[0]
2626
}
2727

test/fixtures/disable_client_cert/network.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ resource "random_string" "suffix" {
2121
}
2222

2323
provider "google" {
24-
version = "~> 3.3.0"
24+
version = "~> 3.14.0"
2525
project = var.project_ids[0]
2626
}
2727

test/fixtures/private_zonal_with_networking/outputs.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,3 +71,7 @@ output "ip_range_services_name" {
7171
description = "The secondary range name for services"
7272
value = module.example.ip_range_services_name
7373
}
74+
output "peering_name" {
75+
description = "The name of the peering between this cluster and the Google owned VPC."
76+
value = module.example.peering_name
77+
}

test/fixtures/shared_vpc/network.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ resource "random_string" "suffix" {
2121
}
2222

2323
provider "google" {
24-
version = "~> 3.3.0"
24+
version = "~> 3.14.0"
2525
project = var.project_ids[0]
2626
}
2727

test/fixtures/simple_regional/network.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ resource "random_string" "suffix" {
2121
}
2222

2323
provider "google" {
24-
version = "~> 3.3.0"
24+
version = "~> 3.14.0"
2525
project = var.project_ids[0]
2626
}
2727

test/fixtures/simple_zonal/network.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ resource "random_string" "suffix" {
2121
}
2222

2323
provider "google" {
24-
version = "~> 3.3.0"
24+
version = "~> 3.14.0"
2525
project = var.project_ids[1]
2626
}
2727

test/fixtures/stub_domains/network.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ resource "random_string" "suffix" {
2121
}
2222

2323
provider "google" {
24-
version = "~> 3.3.0"
24+
version = "~> 3.14.0"
2525
project = var.project_ids[1]
2626
}
2727

test/fixtures/stub_domains_upstream_nameservers/network.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ resource "random_string" "suffix" {
2121
}
2222

2323
provider "google" {
24-
version = "~> 3.3.0"
24+
version = "~> 3.14.0"
2525
project = var.project_ids[1]
2626
}
2727

test/fixtures/upstream_nameservers/network.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ resource "random_string" "suffix" {
2121
}
2222

2323
provider "google" {
24-
version = "~> 3.3.0"
24+
version = "~> 3.14.0"
2525
project = var.project_ids[1]
2626
}
2727

0 commit comments

Comments
 (0)