From e6952a4a301063c3ceeef5257c9474a6a0e09e33 Mon Sep 17 00:00:00 2001 From: Dmitry Kozlov Date: Wed, 13 Mar 2019 19:33:04 +0300 Subject: [PATCH] Add support for guest_accelerator in container_node_pool.node_config https://github.com/terraform-google-modules/terraform-google-kubernetes-engine/issues/101 --- cluster_regional.tf | 5 +++++ cluster_zonal.tf | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/cluster_regional.tf b/cluster_regional.tf index 34030ef0c5..fb02783181 100644 --- a/cluster_regional.tf +++ b/cluster_regional.tf @@ -127,6 +127,11 @@ resource "google_container_node_pool" "pools" { oauth_scopes = [ "https://www.googleapis.com/auth/cloud-platform", ] + + guest_accelerator { + type = "${lookup(var.node_pools[count.index], "guest_accelerator_type", "")}" + count = "${lookup(var.node_pools[count.index], "guest_accelerator_count", 0)}" + } } lifecycle { diff --git a/cluster_zonal.tf b/cluster_zonal.tf index b9298e56eb..373adc026b 100644 --- a/cluster_zonal.tf +++ b/cluster_zonal.tf @@ -127,6 +127,11 @@ resource "google_container_node_pool" "zonal_pools" { oauth_scopes = [ "https://www.googleapis.com/auth/cloud-platform", ] + + guest_accelerator { + type = "${lookup(var.node_pools[count.index], "guest_accelerator_type", "")}" + count = "${lookup(var.node_pools[count.index], "guest_accelerator_count", 0)}" + } } lifecycle {