Description
The inventory lists Dataflow jobs declared in Terraform, including batch and streaming pipelines.
Potential impact
An overlooked job can retain access to source data, output destinations or temporary files.
Remediation
Record the owner, input sources and output destinations. Check the worker service account, network, temporary bucket and encryption key policy.
Examples
The example labels the job for the streaming service in prod. Supply the template and temporary-storage gs:// paths for your environment.
Before
hcl
resource "google_dataflow_job" "stream_job" {
name = "stream-job"
template_gcs_path = "gs://example/templates/job"
temp_gcs_location = "gs://example/tmp"
}
After
hcl
resource "google_dataflow_job" "stream_job" {
name = "stream-job"
template_gcs_path = "gs://example/templates/job"
temp_gcs_location = "gs://example/tmp"
labels = {
service = "streaming"
env = "prod"
}
}