Skip to content

Commit 2d8d05e

Browse files
feat(google_gke): added configuration for control_plane_endpoints_config, updated versions and added variable to toggle (#259)
* feat(google_gke): added configuration for control_plane_endpoints_config, updated versions and added variable to toggle * chore(docs): google_gke/README.md --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 659aa96 commit 2d8d05e

4 files changed

Lines changed: 19 additions & 6 deletions

File tree

google_gke/README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -254,15 +254,15 @@ Module creates an opinionated GKE cluster plus related resources within a Shared
254254
| Name | Version |
255255
|------|---------|
256256
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.8 |
257-
| <a name="requirement_google"></a> [google](#requirement\_google) | ~> 5.35 |
258-
| <a name="requirement_google-beta"></a> [google-beta](#requirement\_google-beta) | ~> 5.35 |
257+
| <a name="requirement_google"></a> [google](#requirement\_google) | >= 6.11 |
258+
| <a name="requirement_google-beta"></a> [google-beta](#requirement\_google-beta) | >= 6.11 |
259259

260260
## Providers
261261

262262
| Name | Version |
263263
|------|---------|
264-
| <a name="provider_google"></a> [google](#provider\_google) | ~> 5.35 |
265-
| <a name="provider_google-beta"></a> [google-beta](#provider\_google-beta) | ~> 5.35 |
264+
| <a name="provider_google"></a> [google](#provider\_google) | >= 6.11 |
265+
| <a name="provider_google-beta"></a> [google-beta](#provider\_google-beta) | >= 6.11 |
266266

267267
## Resources
268268

@@ -290,6 +290,7 @@ Module creates an opinionated GKE cluster plus related resources within a Shared
290290
| <a name="input_dns_cache"></a> [dns\_cache](#input\_dns\_cache) | The status of the NodeLocal DNSCache addon. | `bool` | `true` | no |
291291
| <a name="input_enable_cost_allocation"></a> [enable\_cost\_allocation](#input\_enable\_cost\_allocation) | Enables Cost Allocation Feature and the cluster name and namespace of your GKE workloads appear in the labels field of the billing export to BigQuery | `bool` | `false` | no |
292292
| <a name="input_enable_dataplane"></a> [enable\_dataplane](#input\_enable\_dataplane) | Whether to enable dataplane v2 on the cluster. Sets DataPath field. Defaults to false. | `bool` | `false` | no |
293+
| <a name="input_enable_dns_endpoint"></a> [enable\_dns\_endpoint](#input\_enable\_dns\_endpoint) | Enable external DNS endpoint for control plane access | `bool` | `false` | no |
293294
| <a name="input_enable_gcfs"></a> [enable\_gcfs](#input\_enable\_gcfs) | Enable Google Container File System (gcfs) image streaming. | `bool` | `true` | no |
294295
| <a name="input_enable_k8s_api_proxy_ip"></a> [enable\_k8s\_api\_proxy\_ip](#input\_enable\_k8s\_api\_proxy\_ip) | Whether we reserve an internal private ip for the k8s\_api\_proxy. Defaults to false. | `bool` | `false` | no |
295296
| <a name="input_enable_network_egress_export"></a> [enable\_network\_egress\_export](#input\_enable\_network\_egress\_export) | Whether to enable network egress metering for this cluster. If enabled, a daemonset will be created in the cluster to meter network egress traffic. Doesn't work with Shared VPC (https://cloud.google.com/kubernetes-engine/docs/how-to/cluster-usage-metering). Defaults to false. | `bool` | `false` | no |

google_gke/cluster.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,12 @@ resource "google_container_cluster" "primary" {
8181
gcp_public_cidrs_access_enabled = var.enable_public_cidrs_access
8282
}
8383

84+
control_plane_endpoints_config {
85+
dns_endpoint_config {
86+
allow_external_traffic = var.enable_dns_endpoint
87+
}
88+
}
89+
8490
dynamic "private_cluster_config" {
8591
for_each = var.enable_private_cluster ? [1] : []
8692

google_gke/variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ variable "description" {
77
type = string
88
}
99

10+
variable "enable_dns_endpoint" {
11+
default = false
12+
description = "Enable external DNS endpoint for control plane access"
13+
type = bool
14+
}
15+
1016
variable "kubernetes_version" {
1117
default = "latest"
1218
description = "The Kubernetes version of the masters. If set to 'latest' it will pull latest available version. Defaults to 'latest'."

google_gke/versions.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ terraform {
33
required_providers {
44
google = {
55
source = "hashicorp/google"
6-
version = "~> 5.35"
6+
version = ">= 6.11"
77
}
88

99
google-beta = {
1010
source = "hashicorp/google-beta"
11-
version = "~> 5.35"
11+
version = ">= 6.11"
1212
}
1313
}
1414

0 commit comments

Comments
 (0)