terraform-google-modules / terraform-google-kubernetes-engine
git clone https://github.com/terraform-google-modules/terraform-google-kubernetes-engine.git
v46.0.0 · 6d ago
🔥 on GitHub Trending today
Configures opinionated GKE clusters
+0
stars, 24h · #23,728
+2
stars, 7 days · #22,595
+3
stars, 30 days · #35,786
1.3k
★ total · +0% this week
1.3k
forks · 74 open issues
Star history (as recorded here)
LanguageHCL
LicenseApache-2.0
Created2018-08-13 (8y ago)
Last pushtoday
Watchers52
OwnerOrganization
Seen on GitHub Trending
- 2026-10-23 — #5 monthly in hcl · +3 ★
- 2026-10-23 — #3 weekly in hcl · +2 ★
- 2026-10-22 — #4 monthly in hcl · +2 ★
- 2026-10-22 — #3 weekly in hcl · +1 ★
- 2026-10-21 — #4 monthly in hcl · +2 ★
- 2026-10-21 — #4 weekly in hcl · +1 ★
- 2026-10-20 — #4 monthly in hcl · +2 ★
- 2026-10-20 — #4 weekly in hcl · +2 ★
GitHub topics
Links
- GitHub: github.com/terraform-google-modules/terraform-google-kubernetes-engine
- Homepage: https://registry.terraform.io/modules/terraform-google-modules/kubernetes-engine/google
- Releases · Issues · Hacker News mentions
README excerpt
# Terraform Kubernetes Engine Module
This module handles opinionated Google Cloud Platform Kubernetes Engine cluster creation and configuration with Node Pools, IP MASQ, Network Policy, etc.
The resources/services/activations/deletions that this module will create/trigger are:
- Create a GKE cluster with the provided addons
- Create GKE Node Pool(s) with provided configuration and attach to cluster
- Replace the default kube-dns configmap if `stub_domains` are provided
- Activate network policy if `network_policy` is true
- Add `ip-masq-agent` configmap with provided `non_masquerade_cidrs` if `configure_ip_masq` is true
Sub modules are provided for creating private clusters, beta private clusters, and beta public clusters as well. Beta sub modules allow for the use of various GKE beta features. See the modules directory for the various sub modules.
## Compatibility
This module is meant for use with Terraform 1.3+ and tested using Terraform 1.14+.
If you find incompatibilities using Terraform `>=1.3`, please open an issue.
If you haven't [upgraded to 1.3][terraform-1.3-upgrade] and need a Terraform
0.13.x-compatible version of this module, the last released version
intended for Terraform 0.13.x is [27.0.0].
If you haven't [upgraded to 0.13][terraform-0.13-upgrade] and need a Terraform
0.12.x-compatible version of this module, the last released version
intended for Terraform 0.12.x is [12.3.0].
## Usage
There are multiple examples included in the examples folder but simple usage is as follows:
[code]
Then perform the following commands on the root folder:
- `terraform init` to get the plugins
- `terraform plan` to see the infrastructure plan
- `terraform apply` to apply the infrastructure build
- `terraform destroy` to destroy the built infrastructure
## Inputs
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| add\_cluster\_firewall\_rules | Create additional firewall rules | `bool` | `false` | no |
| add\_master\_webhook\_firewall\_rules | Create master\_webhook firewall rules for ports defined in `firewall_inbound_ports` | `bool` | `false` | no |
| add\_shadow\_firewall\_rules | Create GKE shadow firewall (the same as default firewall rules with firewall logs enabled). | `bool` | `false` | no |
| additional\_ip\_range\_pods | List of _names_ of the additional secondary subnet ip ranges to use for pods | `list(string)` | `[]` | no |
| additional\_ip\_ranges\_config | the configuration for individual additional subnetworks attached to the cluster | `list(object({ subnetwork = string, pod_ipv4_range_names = list(string) }))` | `[]` | no |
| additive\_vpc\_scope\_dns\_domain | This will enable Cloud DNS additive VPC scope. Must provide a domain name that is unique within the VPC. For this to work cluster\_dns = `CLOUD_DNS` and cluster\_dns\_scope = `CLUSTER_SCOPE` must both be set as well. | `string` | `""` | no |
| agent\_sandbox\_enabled | The status of the Agent Sandbox addon, which isolates