Skip to content

Commit

Permalink
Enable Secure Boot for GKE clusters.
Browse files Browse the repository at this point in the history
  • Loading branch information
SanjayVas committed Nov 7, 2023
1 parent d185fbc commit dc290e1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/main/terraform/gcloud/modules/cluster/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,9 @@ resource "google_container_cluster" "cluster" {
# See https://registry.terraform.io/providers/hashicorp/google/4.63.0/docs/resources/container_cluster#example-usage---with-a-separately-managed-node-pool-recommended
remove_default_node_pool = true
initial_node_count = 1
node_config {
shielded_instance_config {
enable_secure_boot = true
}
}
}
3 changes: 3 additions & 0 deletions src/main/terraform/gcloud/modules/node-pool/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ resource "google_container_node_pool" "node_pool" {
machine_type = var.machine_type
disk_type = "pd-balanced"
spot = var.spot
shielded_instance_config {
enable_secure_boot = true
}

dynamic "taint" {
for_each = var.spot ? [{
Expand Down

0 comments on commit dc290e1

Please sign in to comment.