diff --git a/mmv1/products/bigquery/terraform.yaml b/mmv1/products/bigquery/terraform.yaml index 05fee0d48abb..57db5702b920 100644 --- a/mmv1/products/bigquery/terraform.yaml +++ b/mmv1/products/bigquery/terraform.yaml @@ -93,6 +93,8 @@ overrides: !ruby/object:Overrides::ResourceOverrides default_from_api: true maxTimeTravelHours: !ruby/object:Overrides::Terraform::PropertyOverride default_from_api: true + friendlyName: !ruby/object:Overrides::Terraform::PropertyOverride + send_empty_value: true custom_code: !ruby/object:Provider::Terraform::CustomCode constants: templates/terraform/constants/bigquery_dataset.go.erb docs: !ruby/object:Provider::Terraform::Docs diff --git a/mmv1/third_party/terraform/tests/resource_big_query_dataset_test.go b/mmv1/third_party/terraform/tests/resource_big_query_dataset_test.go index e083807fd4b6..8c36e10fd473 100644 --- a/mmv1/third_party/terraform/tests/resource_big_query_dataset_test.go +++ b/mmv1/third_party/terraform/tests/resource_big_query_dataset_test.go @@ -35,6 +35,14 @@ func TestAccBigQueryDataset_basic(t *testing.T) { ImportState: true, ImportStateVerify: true, }, + { + Config: testAccBigQueryDatasetUpdated2(datasetID), + }, + { + ResourceName: "google_bigquery_dataset.test", + ImportState: true, + ImportStateVerify: true, + }, }, }) } @@ -212,6 +220,24 @@ resource "google_bigquery_dataset" "test" { `, datasetID) } +func testAccBigQueryDatasetUpdated2(datasetID string) string { + return fmt.Sprintf(` +resource "google_bigquery_dataset" "test" { + dataset_id = "%s" + # friendly_name = "bar" + description = "This is a bar description" + location = "EU" + default_partition_expiration_ms = 7200000 + default_table_expiration_ms = 7200000 + + labels = { + env = "bar" + default_table_expiration_ms = 7200000 + } +} +`, datasetID) +} + func testAccBigQueryDatasetDeleteContents(datasetID string) string { return fmt.Sprintf(` resource "google_bigquery_dataset" "contents_test" { diff --git a/mmv1/third_party/validator/tests/data/example_bigquery_dataset.json b/mmv1/third_party/validator/tests/data/example_bigquery_dataset.json index c753c5f5547b..c55d9a2c4ee6 100644 --- a/mmv1/third_party/validator/tests/data/example_bigquery_dataset.json +++ b/mmv1/third_party/validator/tests/data/example_bigquery_dataset.json @@ -9,6 +9,7 @@ "discovery_name": "Dataset", "parent": "//cloudresourcemanager.googleapis.com/projects/{{.Provider.project}}", "data": { + "friendlyName": "", "datasetReference": { "datasetId": "test-dataset" }, diff --git a/mmv1/third_party/validator/tests/data/example_bigquery_dataset_iam_binding.json b/mmv1/third_party/validator/tests/data/example_bigquery_dataset_iam_binding.json index a3f5bacc6a2a..770149249ec3 100644 --- a/mmv1/third_party/validator/tests/data/example_bigquery_dataset_iam_binding.json +++ b/mmv1/third_party/validator/tests/data/example_bigquery_dataset_iam_binding.json @@ -16,7 +16,8 @@ "labels": { "env": "dev" }, - "location": "EU" + "location": "EU", + "friendlyName": "" } }, "iam_policy": { diff --git a/mmv1/third_party/validator/tests/data/example_bigquery_dataset_iam_member.json b/mmv1/third_party/validator/tests/data/example_bigquery_dataset_iam_member.json index dbda7165dc35..7aed9ac6ce97 100644 --- a/mmv1/third_party/validator/tests/data/example_bigquery_dataset_iam_member.json +++ b/mmv1/third_party/validator/tests/data/example_bigquery_dataset_iam_member.json @@ -16,7 +16,8 @@ "labels": { "env": "dev" }, - "location": "EU" + "location": "EU", + "friendlyName": "" } }, "iam_policy": { diff --git a/mmv1/third_party/validator/tests/data/example_bigquery_dataset_iam_policy.json b/mmv1/third_party/validator/tests/data/example_bigquery_dataset_iam_policy.json index adbde0c059ae..5908f8d7600c 100644 --- a/mmv1/third_party/validator/tests/data/example_bigquery_dataset_iam_policy.json +++ b/mmv1/third_party/validator/tests/data/example_bigquery_dataset_iam_policy.json @@ -16,7 +16,8 @@ "labels": { "env": "dev" }, - "location": "EU" + "location": "EU", + "friendlyName": "" } }, "iam_policy": { diff --git a/mmv1/third_party/validator/tests/data/example_bigquery_dataset_iam_policy_empty_policy_data.json b/mmv1/third_party/validator/tests/data/example_bigquery_dataset_iam_policy_empty_policy_data.json index 4431d5967864..f1a5ec56ace2 100644 --- a/mmv1/third_party/validator/tests/data/example_bigquery_dataset_iam_policy_empty_policy_data.json +++ b/mmv1/third_party/validator/tests/data/example_bigquery_dataset_iam_policy_empty_policy_data.json @@ -12,7 +12,8 @@ "datasetReference": { "datasetId": "example_dataset" }, - "location": "US" + "location": "US", + "friendlyName": "" } }, "iam_policy": {