Log whenever somebody connects to prod SSH using IAP

This commit is contained in:
Andrew Dryga
2024-04-03 18:13:01 -06:00
parent e169150ee7
commit fff2e527e6
4 changed files with 17 additions and 0 deletions

View File

@@ -190,6 +190,11 @@ resource "google_compute_firewall" "metabase-ssh-ipv4" {
ports = [22]
}
log_config {
metadata = "INCLUDE_ALL_METADATA"
}
# Only allows connections using IAP
source_ranges = local.iap_ipv4_ranges
target_tags = module.metabase.target_tags

View File

@@ -109,6 +109,10 @@ resource "google_compute_firewall" "gateways-ssh-ipv4" {
ports = [22]
}
log_config {
metadata = "INCLUDE_ALL_METADATA"
}
# Only allows connections using IAP
source_ranges = local.iap_ipv4_ranges
target_tags = module.gateways[0].target_tags

View File

@@ -196,6 +196,10 @@ resource "google_compute_firewall" "ssh-ipv4" {
ports = [22]
}
log_config {
metadata = "INCLUDE_ALL_METADATA"
}
# Only allows connections using IAP
source_ranges = local.iap_ipv4_ranges
target_tags = concat(

View File

@@ -146,6 +146,10 @@ resource "google_compute_firewall" "relays-ssh-ipv4" {
ports = [22]
}
log_config {
metadata = "INCLUDE_ALL_METADATA"
}
# Only allows connections using IAP
source_ranges = local.iap_ipv4_ranges
target_tags = module.relays[0].target_tags