Skip to content

Commit 74d37d8

Browse files
authored
fix: Make GKE components ADC compatible (#2440)
1 parent 0ffe3f9 commit 74d37d8

File tree

18 files changed

+1281
-204
lines changed

18 files changed

+1281
-204
lines changed

examples/gke_autopilot_cluster/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ module "gke" {
3636
source = "terraform-google-modules/kubernetes-engine/google//modules/gke-autopilot-cluster"
3737
version = "~> 38.0"
3838

39-
project = var.project_id
39+
project_id = var.project_id
4040
name = "${local.cluster_type}-cluster"
4141
location = var.region
4242
network = module.gcp-network.network_self_link

examples/gke_standard_cluster/main.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ module "gke" {
3737
source = "terraform-google-modules/kubernetes-engine/google//modules/gke-standard-cluster"
3838
version = "~> 38.0"
3939

40-
project = var.project_id
40+
project_id = var.project_id
4141
name = "${local.cluster_type}-cluster${var.cluster_name_suffix}"
4242
location = var.region
4343
network = var.network
@@ -87,7 +87,7 @@ module "node_pool" {
8787
source = "terraform-google-modules/kubernetes-engine/google//modules/gke-node-pool"
8888
version = "~> 38.0"
8989

90-
project = var.project_id
90+
project_id = var.project_id
9191
location = var.region
9292
cluster = module.gke.cluster_name
9393
node_config = {

modules/gke-autopilot-cluster/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ For a module with a complete configuration of a Google Cloud Platform Kubernetes
5454
| pod\_security\_policy\_config | Configuration for the [PodSecurityPolicy](https://cloud.google.com/kubernetes-engine/docs/how-to/pod-security-policies) feature. | <pre>object({<br> enabled = bool<br> })</pre> | `null` | no |
5555
| private\_cluster\_config | Configuration for private clusters, clusters with private nodes. | <pre>object({<br> enable_private_nodes = optional(bool)<br> enable_private_endpoint = optional(bool)<br> master_ipv4_cidr_block = optional(string)<br> private_endpoint_subnetwork = optional(string)<br> master_global_access_config = optional(object({<br> enabled = optional(bool)<br> }))<br> })</pre> | <pre>{<br> "enable_private_endpoint": true,<br> "enable_private_nodes": true,<br> "master_global_access_config": {<br> "enabled": true<br> }<br>}</pre> | no |
5656
| private\_ipv6\_google\_access | The desired state of IPv6 access to Google Services. By default, no private IPv6 access to or from Google Services (all access will be via IPv4). | `string` | `null` | no |
57-
| project | The ID of the project in which the resource belongs. If it is not provided, the provider project is used. | `string` | n/a | yes |
57+
| project\_id | The ID of the project in which the resource belongs. If it is not provided, the provider project is used. | `string` | n/a | yes |
5858
| protect\_config | Enable/Disable Protect API features for the cluster. | <pre>object({<br> workload_config = object({<br> audit_mode = string<br> })<br> workload_vulnerability_mode = optional(string)<br> })</pre> | `null` | no |
5959
| release\_channel | The release channel of this cluster. Accepted values are `UNSPECIFIED`, `RAPID`, `REGULAR` and `STABLE`. Defaults to `REGULAR`. | <pre>object({<br> channel = optional(string)<br> })</pre> | <pre>{<br> "channel": "REGULAR"<br>}</pre> | no |
6060
| resource\_labels | The GCE resource labels (a map of key/value pairs) to be applied to the cluster. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective\_labels' for all of the labels present on the resource. | `map(string)` | `null` | no |

modules/gke-autopilot-cluster/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ resource "google_container_cluster" "main" {
1919

2020
name = var.name
2121
description = var.description
22-
project = var.project
22+
project = var.project_id
2323
resource_labels = var.resource_labels
2424
location = var.location
2525
node_locations = var.node_locations

0 commit comments

Comments
 (0)