From 025dc40640f24626f64c8f9a00bcbf36f1919056 Mon Sep 17 00:00:00 2001 From: The Magician Date: Wed, 21 Apr 2021 14:58:31 -0700 Subject: [PATCH] make bigquery dataset dataset_id forcenew (#4726) (#8973) * make bigquery dataset dataset_id forcenew * make project_id and datasetReference input true as well Signed-off-by: Modular Magician --- .changelog/4726.txt | 6 ++++++ google/resource_big_query_dataset.go | 1 + 2 files changed, 7 insertions(+) create mode 100644 .changelog/4726.txt diff --git a/.changelog/4726.txt b/.changelog/4726.txt new file mode 100644 index 00000000000..6fdca5d2e8b --- /dev/null +++ b/.changelog/4726.txt @@ -0,0 +1,6 @@ +```release-note:bug +bigquery: fixed `dataset_id` to force new resource if name is changed. +``` +```release-note:breaking-change +bigquery: updating `dataset_id` or `project_id` in `google_bigquery_dataset` will now recreate the resource +``` diff --git a/google/resource_big_query_dataset.go b/google/resource_big_query_dataset.go index e2579fb87db..df33755ff54 100644 --- a/google/resource_big_query_dataset.go +++ b/google/resource_big_query_dataset.go @@ -73,6 +73,7 @@ func resourceBigQueryDataset() *schema.Resource { "dataset_id": { Type: schema.TypeString, Required: true, + ForceNew: true, ValidateFunc: validateDatasetId, Description: `A unique ID for this dataset, without the project name. The ID must contain only letters (a-z, A-Z), numbers (0-9), or