Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GKE 101: added guest_accelerator feature and tests #157

12 changes: 10 additions & 2 deletions autogen/cluster_regional.tf
Original file line number Diff line number Diff line change
@@ -14,13 +14,13 @@
* limitations under the License.
*/

// This file was automatically generated from a template in ./autogen
{{ autogeneration_note }}

/******************************************
Create regional cluster
*****************************************/
resource "google_container_cluster" "primary" {
provider = "google"
provider = "{% if private_cluster %}google-beta{%else %}google{% endif %}"
count = "${var.regional ? 1 : 0}"
name = "${var.name}"
description = "${var.description}"
@@ -93,6 +93,14 @@ resource "google_container_cluster" "primary" {
service_account = "${lookup(var.node_pools[0], "service_account", local.service_account)}"
}
}
{% if private_cluster %}

private_cluster_config {
enable_private_endpoint = "${var.enable_private_endpoint}"
enable_private_nodes = "${var.enable_private_nodes}"
master_ipv4_cidr_block = "${var.master_ipv4_cidr_block}"
}
{% endif %}

remove_default_node_pool = "${var.remove_default_node_pool}"
}
12 changes: 10 additions & 2 deletions autogen/cluster_zonal.tf
Original file line number Diff line number Diff line change
@@ -14,13 +14,13 @@
* limitations under the License.
*/

// This file was automatically generated from a template in ./autogen
{{ autogeneration_note }}

/******************************************
Create zonal cluster
*****************************************/
resource "google_container_cluster" "zonal_primary" {
provider = "google"
provider = "{% if private_cluster %}google-beta{%else %}google{% endif %}"
count = "${var.regional ? 0 : 1}"
name = "${var.name}"
description = "${var.description}"
@@ -93,6 +93,14 @@ resource "google_container_cluster" "zonal_primary" {
service_account = "${lookup(var.node_pools[0], "service_account", local.service_account)}"
}
}
{% if private_cluster %}

private_cluster_config {
enable_private_endpoint = "${var.enable_private_endpoint}"
enable_private_nodes = "${var.enable_private_nodes}"
master_ipv4_cidr_block = "${var.master_ipv4_cidr_block}"
}
{% endif %}

remove_default_node_pool = "${var.remove_default_node_pool}"
}
8 changes: 7 additions & 1 deletion modules/private-cluster/cluster_regional.tf
Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@
Create regional cluster
*****************************************/
resource "google_container_cluster" "primary" {
provider = "google"
provider = "google-beta"
count = "${var.regional ? 1 : 0}"
name = "${var.name}"
description = "${var.description}"
@@ -94,6 +94,12 @@ resource "google_container_cluster" "primary" {
}
}

private_cluster_config {
enable_private_endpoint = "${var.enable_private_endpoint}"
enable_private_nodes = "${var.enable_private_nodes}"
master_ipv4_cidr_block = "${var.master_ipv4_cidr_block}"
}

remove_default_node_pool = "${var.remove_default_node_pool}"
}

8 changes: 7 additions & 1 deletion modules/private-cluster/cluster_zonal.tf
Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@
Create zonal cluster
*****************************************/
resource "google_container_cluster" "zonal_primary" {
provider = "google"
provider = "google-beta"
count = "${var.regional ? 0 : 1}"
name = "${var.name}"
description = "${var.description}"
@@ -94,6 +94,12 @@ resource "google_container_cluster" "zonal_primary" {
}
}

private_cluster_config {
enable_private_endpoint = "${var.enable_private_endpoint}"
enable_private_nodes = "${var.enable_private_nodes}"
master_ipv4_cidr_block = "${var.master_ipv4_cidr_block}"
}

remove_default_node_pool = "${var.remove_default_node_pool}"
}