diff --git a/mmv1/templates/terraform/examples/bigquery_bigquery_table.tf.erb b/mmv1/templates/terraform/examples/bigquery_bigquery_table.tf.erb index fe6b1e285553..b4c15cfa7dd1 100644 --- a/mmv1/templates/terraform/examples/bigquery_bigquery_table.tf.erb +++ b/mmv1/templates/terraform/examples/bigquery_bigquery_table.tf.erb @@ -1,53 +1,54 @@ resource "google_bigquery_dataset" "test" { - dataset_id = "<%= ctx[:vars]['dataset_id'] %>" + dataset_id = "<%= ctx[:vars]['dataset_id'] %>" } resource "google_bigquery_table" "test" { - table_id = "<%= ctx[:vars]['table_id'] %>" - dataset_id = google_bigquery_dataset.test.dataset_id - time_partitioning { - type = "DAY" - } - schema = < **Note**: On newer versions of the provider, you must explicitly set `deletion_protection=false` +(and run `terraform apply` to write the field to state) in order to destroy an instance. +It is recommended to not set this field (or set it to true) until you're ready to destroy. + ## Example Usage @@ -136,6 +140,9 @@ The following arguments are supported: * `materialized_view` - (Optional) If specified, configures this table as a materialized view. Structure is documented below. +* `deletion_protection` - (Optional) Whether or not to allow Terraform to destroy the instance. Unless this field is set to false +in Terraform state, a `terraform destroy` or `terraform apply` that would delete the instance will fail. + The `external_data_configuration` block supports: * `autodetect` - (Required) - Let BigQuery try to autodetect the schema