diff --git a/CHANGELOG.md b/CHANGELOG.md index e7e738732c..9b9d87223a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ Extending the adopted spec, each change should have a link to its corresponding * Support for setting node_locations on node pools. [#303] * Fix for specifying `node_count` on node pools when autoscaling is disabled. [#311] * Added submodule for installing Anthos Config Management. [#268] +* Support for `local_ssd_count` in node pool configuration. [#244] ## [v5.1.1] - 2019-10-25 @@ -245,6 +246,7 @@ In either case, upgrading to module version `v1.0.0` will trigger a recreation o [#238]: https://github.com/terraform-google-modules/terraform-google-kubernetes-engine/pull/238 [#241]: https://github.com/terraform-google-modules/terraform-google-kubernetes-engine/pull/241 [#250]: https://github.com/terraform-google-modules/terraform-google-kubernetes-engine/pull/250 +[#244]: https://github.com/terraform-google-modules/terraform-google-kubernetes-engine/pull/244 [#236]: https://github.com/terraform-google-modules/terraform-google-kubernetes-engine/pull/236 [#217]: https://github.com/terraform-google-modules/terraform-google-kubernetes-engine/pull/217 [#234]: https://github.com/terraform-google-modules/terraform-google-kubernetes-engine/pull/234 diff --git a/README.md b/README.md index 15f6aff13b..1068fc7f30 100644 --- a/README.md +++ b/README.md @@ -43,6 +43,7 @@ module "gke" { machine_type = "n1-standard-2" min_count = 1 max_count = 100 + local_ssd_count = 0 disk_size_gb = 100 disk_type = "pd-standard" image_type = "COS" diff --git a/autogen/README.md b/autogen/README.md index 3efe785ff0..4165c9b8d8 100644 --- a/autogen/README.md +++ b/autogen/README.md @@ -60,6 +60,7 @@ module "gke" { {% endif %} min_count = 1 max_count = 100 + local_ssd_count = 0 disk_size_gb = 100 disk_type = "pd-standard" image_type = "COS" diff --git a/autogen/cluster.tf.tmpl b/autogen/cluster.tf.tmpl index 4791220591..27448db32d 100644 --- a/autogen/cluster.tf.tmpl +++ b/autogen/cluster.tf.tmpl @@ -384,8 +384,10 @@ resource "google_container_node_pool" "pools" { var.node_pools_tags[var.node_pools[count.index]["name"]], ) - disk_size_gb = lookup(var.node_pools[count.index], "disk_size_gb", 100) - disk_type = lookup(var.node_pools[count.index], "disk_type", "pd-standard") + local_ssd_count = lookup(var.node_pools[count.index], "local_ssd_count", 0) + disk_size_gb = lookup(var.node_pools[count.index], "disk_size_gb", 100) + disk_type = lookup(var.node_pools[count.index], "disk_type", "pd-standard") + service_account = lookup( var.node_pools[count.index], "service_account", diff --git a/cluster.tf b/cluster.tf index 072a60fb14..07801f226a 100644 --- a/cluster.tf +++ b/cluster.tf @@ -185,8 +185,10 @@ resource "google_container_node_pool" "pools" { var.node_pools_tags[var.node_pools[count.index]["name"]], ) - disk_size_gb = lookup(var.node_pools[count.index], "disk_size_gb", 100) - disk_type = lookup(var.node_pools[count.index], "disk_type", "pd-standard") + local_ssd_count = lookup(var.node_pools[count.index], "local_ssd_count", 0) + disk_size_gb = lookup(var.node_pools[count.index], "disk_size_gb", 100) + disk_type = lookup(var.node_pools[count.index], "disk_type", "pd-standard") + service_account = lookup( var.node_pools[count.index], "service_account", diff --git a/examples/node_pool/main.tf b/examples/node_pool/main.tf index 5bc0f53407..1ae41a53bb 100644 --- a/examples/node_pool/main.tf +++ b/examples/node_pool/main.tf @@ -50,6 +50,7 @@ module "gke" { machine_type = "n1-standard-2" min_count = 1 max_count = 2 + local_ssd_count = 0 disk_size_gb = 30 disk_type = "pd-standard" accelerator_count = 1 diff --git a/modules/beta-private-cluster-update-variant/README.md b/modules/beta-private-cluster-update-variant/README.md index d2b5197726..51efdb5467 100644 --- a/modules/beta-private-cluster-update-variant/README.md +++ b/modules/beta-private-cluster-update-variant/README.md @@ -51,6 +51,7 @@ module "gke" { node_locations = "us-central1-b,us-central1-c" min_count = 1 max_count = 100 + local_ssd_count = 0 disk_size_gb = 100 disk_type = "pd-standard" image_type = "COS" diff --git a/modules/beta-private-cluster-update-variant/cluster.tf b/modules/beta-private-cluster-update-variant/cluster.tf index 10c206f35c..8cc2311055 100644 --- a/modules/beta-private-cluster-update-variant/cluster.tf +++ b/modules/beta-private-cluster-update-variant/cluster.tf @@ -352,8 +352,10 @@ resource "google_container_node_pool" "pools" { var.node_pools_tags[var.node_pools[count.index]["name"]], ) - disk_size_gb = lookup(var.node_pools[count.index], "disk_size_gb", 100) - disk_type = lookup(var.node_pools[count.index], "disk_type", "pd-standard") + local_ssd_count = lookup(var.node_pools[count.index], "local_ssd_count", 0) + disk_size_gb = lookup(var.node_pools[count.index], "disk_size_gb", 100) + disk_type = lookup(var.node_pools[count.index], "disk_type", "pd-standard") + service_account = lookup( var.node_pools[count.index], "service_account", diff --git a/modules/beta-private-cluster/README.md b/modules/beta-private-cluster/README.md index 96ad9abf5a..71e281d32e 100644 --- a/modules/beta-private-cluster/README.md +++ b/modules/beta-private-cluster/README.md @@ -51,6 +51,7 @@ module "gke" { node_locations = "us-central1-b,us-central1-c" min_count = 1 max_count = 100 + local_ssd_count = 0 disk_size_gb = 100 disk_type = "pd-standard" image_type = "COS" diff --git a/modules/beta-private-cluster/cluster.tf b/modules/beta-private-cluster/cluster.tf index c363dacf9f..95b78225e7 100644 --- a/modules/beta-private-cluster/cluster.tf +++ b/modules/beta-private-cluster/cluster.tf @@ -280,8 +280,10 @@ resource "google_container_node_pool" "pools" { var.node_pools_tags[var.node_pools[count.index]["name"]], ) - disk_size_gb = lookup(var.node_pools[count.index], "disk_size_gb", 100) - disk_type = lookup(var.node_pools[count.index], "disk_type", "pd-standard") + local_ssd_count = lookup(var.node_pools[count.index], "local_ssd_count", 0) + disk_size_gb = lookup(var.node_pools[count.index], "disk_size_gb", 100) + disk_type = lookup(var.node_pools[count.index], "disk_type", "pd-standard") + service_account = lookup( var.node_pools[count.index], "service_account", diff --git a/modules/beta-public-cluster/README.md b/modules/beta-public-cluster/README.md index 7fcf78cccc..5052b306a9 100644 --- a/modules/beta-public-cluster/README.md +++ b/modules/beta-public-cluster/README.md @@ -46,6 +46,7 @@ module "gke" { node_locations = "us-central1-b,us-central1-c" min_count = 1 max_count = 100 + local_ssd_count = 0 disk_size_gb = 100 disk_type = "pd-standard" image_type = "COS" diff --git a/modules/beta-public-cluster/cluster.tf b/modules/beta-public-cluster/cluster.tf index 1f5eee84aa..638d65af9d 100644 --- a/modules/beta-public-cluster/cluster.tf +++ b/modules/beta-public-cluster/cluster.tf @@ -275,8 +275,10 @@ resource "google_container_node_pool" "pools" { var.node_pools_tags[var.node_pools[count.index]["name"]], ) - disk_size_gb = lookup(var.node_pools[count.index], "disk_size_gb", 100) - disk_type = lookup(var.node_pools[count.index], "disk_type", "pd-standard") + local_ssd_count = lookup(var.node_pools[count.index], "local_ssd_count", 0) + disk_size_gb = lookup(var.node_pools[count.index], "disk_size_gb", 100) + disk_type = lookup(var.node_pools[count.index], "disk_type", "pd-standard") + service_account = lookup( var.node_pools[count.index], "service_account", diff --git a/modules/private-cluster-update-variant/README.md b/modules/private-cluster-update-variant/README.md index fa9cdb8852..f73d070cb1 100644 --- a/modules/private-cluster-update-variant/README.md +++ b/modules/private-cluster-update-variant/README.md @@ -48,6 +48,7 @@ module "gke" { machine_type = "n1-standard-2" min_count = 1 max_count = 100 + local_ssd_count = 0 disk_size_gb = 100 disk_type = "pd-standard" image_type = "COS" diff --git a/modules/private-cluster-update-variant/cluster.tf b/modules/private-cluster-update-variant/cluster.tf index d7fc2dd736..af422abb2d 100644 --- a/modules/private-cluster-update-variant/cluster.tf +++ b/modules/private-cluster-update-variant/cluster.tf @@ -262,8 +262,10 @@ resource "google_container_node_pool" "pools" { var.node_pools_tags[var.node_pools[count.index]["name"]], ) - disk_size_gb = lookup(var.node_pools[count.index], "disk_size_gb", 100) - disk_type = lookup(var.node_pools[count.index], "disk_type", "pd-standard") + local_ssd_count = lookup(var.node_pools[count.index], "local_ssd_count", 0) + disk_size_gb = lookup(var.node_pools[count.index], "disk_size_gb", 100) + disk_type = lookup(var.node_pools[count.index], "disk_type", "pd-standard") + service_account = lookup( var.node_pools[count.index], "service_account", diff --git a/modules/private-cluster/README.md b/modules/private-cluster/README.md index 5465544b82..d23f84b68b 100644 --- a/modules/private-cluster/README.md +++ b/modules/private-cluster/README.md @@ -48,6 +48,7 @@ module "gke" { machine_type = "n1-standard-2" min_count = 1 max_count = 100 + local_ssd_count = 0 disk_size_gb = 100 disk_type = "pd-standard" image_type = "COS" diff --git a/modules/private-cluster/cluster.tf b/modules/private-cluster/cluster.tf index c8051255bf..4567530763 100644 --- a/modules/private-cluster/cluster.tf +++ b/modules/private-cluster/cluster.tf @@ -190,8 +190,10 @@ resource "google_container_node_pool" "pools" { var.node_pools_tags[var.node_pools[count.index]["name"]], ) - disk_size_gb = lookup(var.node_pools[count.index], "disk_size_gb", 100) - disk_type = lookup(var.node_pools[count.index], "disk_type", "pd-standard") + local_ssd_count = lookup(var.node_pools[count.index], "local_ssd_count", 0) + disk_size_gb = lookup(var.node_pools[count.index], "disk_size_gb", 100) + disk_type = lookup(var.node_pools[count.index], "disk_type", "pd-standard") + service_account = lookup( var.node_pools[count.index], "service_account",