79747179

Date: 2025-08-26 18:14:43
Score: 0.5
Natty:
Report link

Terraform can’t get the CSV and make it to the table alone. It’s like a blueprint of a building, you can design it to have like 3 floors or 30 floors but you cannot see inside of the building(bucket) and say that 10 CSV make 10 tables.

Terraform is for defining infrastructure, not reading live data. It can create buckets, datasets, and tables you tell it about, but it won’t look inside a bucket to find CSVs. If you want one table per CSV, you’d have to list the files yourself, Terraform won’t discover them automatically.

A better approach is to let Terraform handle creating the buckets and datasets, and then use a Cloud Function that triggers whenever a CSV file is uploaded. The Cloud Function can then tell BigQuery to create a new external table for that file, using the query or schema you define.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: marky