GCP creating cluster fails if project has `constraints/compute.requireShieldedVm` even if `machine_secure_boot` was set to true

  • GET version:
  • Cloud Provider: GCP
  • Environment configuration:

When creating a GKE cluster the toolkit creates a temporary node pool with 1 node in it. However it does not enable secure boot on this node even if machine_secure_boot was set to true in the gitlab_ref_arch_gcp. This causes terraform apply to fail if the project has constraints/compute.requireShieldedVm enabled.

I believe this can be fixed by simply adding the following block to the node_config here:

shielded_instance_config {
  enable_secure_boot = var.machine_secure_boot
}
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information