From 9bd1d5bb79ebaf971929f923adcceff2233574f1 Mon Sep 17 00:00:00 2001 From: Chinmay Dorlikar <37778372+chinmaydorlikar@users.noreply.github.com> Date: Sun, 27 Sep 2020 18:46:09 +0530 Subject: [PATCH] Updated the main.tf for bigquery-datasets (#146) Added the "depends_on" attribute for views to be created only after all the tables are created to avoid failure. --- modules/bigquery-dataset/main.tf | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/bigquery-dataset/main.tf b/modules/bigquery-dataset/main.tf index 056d8b1c0..89a5db7c6 100644 --- a/modules/bigquery-dataset/main.tf +++ b/modules/bigquery-dataset/main.tf @@ -189,6 +189,7 @@ resource "google_bigquery_table" "default" { resource "google_bigquery_table" "views" { + depends_on = [google_bigquery_table.default] for_each = var.views project = var.project_id dataset_id = google_bigquery_dataset.default.dataset_id