Skip to content

Commit

Permalink
Fix the failing tests TestAccBigQueryJob_bigqueryJobCopy* (GoogleClou…
Browse files Browse the repository at this point in the history
  • Loading branch information
wj-chen authored and pcostell committed Jul 16, 2024
1 parent f293551 commit e612cf4
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
8 changes: 6 additions & 2 deletions mmv1/templates/terraform/examples/bigquery_job_copy.tf.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
locals {
count = 2
}

resource "google_bigquery_table" "source" {
deletion_protection = false
count = length(google_bigquery_dataset.source)
count = local.count

dataset_id = google_bigquery_dataset.source[count.index].dataset_id
table_id = "<%= ctx[:vars]['job_id'] %>_${count.index}_table"
Expand All @@ -27,7 +31,7 @@ EOF
}

resource "google_bigquery_dataset" "source" {
count = 2
count = local.count

dataset_id = "<%= ctx[:vars]['job_id'] %>_${count.index}_dataset"
friendly_name = "test"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
locals {
count = 2
}

resource "google_bigquery_table" "source" {
deletion_protection = false
count = length(google_bigquery_dataset.source)
count = local.count

dataset_id = google_bigquery_dataset.source[count.index].dataset_id
table_id = "<%= ctx[:vars]['job_id'] %>_${count.index}_table"
Expand All @@ -24,10 +28,12 @@ resource "google_bigquery_table" "source" {
}
]
EOF

depends_on = [google_bigquery_dataset.source]
}

resource "google_bigquery_dataset" "source" {
count = 2
count = local.count

dataset_id = "<%= ctx[:vars]['job_id'] %>_${count.index}_dataset"
friendly_name = "test"
Expand Down

0 comments on commit e612cf4

Please sign in to comment.