Skip to content

Commit

Permalink
fix: block project-wide SSH keys (#897)
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-cit authored Dec 6, 2022
1 parent 9285cd7 commit 07e9ab5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
6 changes: 5 additions & 1 deletion 3-networks-hub-and-spoke/modules/transitivity/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,17 @@ module "templates" {
network = var.vpc_name
project_id = var.project_id
region = each.key

service_account = {
email = module.service_account.email
scopes = ["cloud-platform"]
}

metadata = {
user-data = templatefile("${path.module}/assets/gw.yaml", { commands = var.commands })
user-data = templatefile("${path.module}/assets/gw.yaml", { commands = var.commands })
block-project-ssh-keys = "true"
}

source_image = "cos-stable-93-16623-102-23"
source_image_project = "cos-cloud"
subnetwork = var.gw_subnets[each.key]
Expand Down
4 changes: 4 additions & 0 deletions 5-app-infra/modules/env_base/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ module "instance_template" {
project_id = local.env_project_id
subnetwork = local.subnetwork_self_link

metadata = {
block-project-ssh-keys = "true"
}

service_account = {
email = google_service_account.compute_engine_service_account.email
scopes = ["compute-rw"]
Expand Down

0 comments on commit 07e9ab5

Please sign in to comment.