output "switch_on" { description = "One command per subnet in var.subnets." value = [for name, region in var.subnets : "gcloud compute networks subnets update ${name} --region ${region} --enable-flow-logs --logging-aggregation-interval=interval-5-sec --logging-flow-sampling=${var.sampling} --logging-metadata=include-all" ] } output "verify" { description = "How to prove records arrive and can be queried." value = <<-EOT gcloud compute networks subnets describe --region --format="value(logConfig.enable)" # True In Log Analytics, query `${var.project_id}.global.vpc-flow-logs._AllLogs` for one address over the last 30 days. Rows come back. EOT }