Skip to content
This repository has been archived by the owner on Nov 27, 2024. It is now read-only.

Commit

Permalink
send friendly_name (#7433) (#1449)
Browse files Browse the repository at this point in the history
* send friendly_name

* fixed validator failures

* update

* fix validator errors

---------

Signed-off-by: Modular Magician <magic-modules@google.com>
Co-authored-by: Edward Sun <sunedward@google.com>
  • Loading branch information
modular-magician and Edward Sun authored Mar 11, 2023
1 parent ff67e75 commit e42a241
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 8 deletions.
2 changes: 1 addition & 1 deletion converters/google/resources/bigquery_dataset.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ func GetBigQueryDatasetApiObject(d TerraformResourceData, config *Config) (map[s
friendlyNameProp, err := expandBigQueryDatasetFriendlyName(d.Get("friendly_name"), d, config)
if err != nil {
return nil, err
} else if v, ok := d.GetOkExists("friendly_name"); !isEmptyValue(reflect.ValueOf(friendlyNameProp)) && (ok || !reflect.DeepEqual(v, friendlyNameProp)) {
} else if v, ok := d.GetOkExists("friendly_name"); ok || !reflect.DeepEqual(v, friendlyNameProp) {
obj["friendlyName"] = friendlyNameProp
}
labelsProp, err := expandBigQueryDatasetLabels(d.Get("labels"), d, config)
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ require (
github.com/hashicorp/go-cleanhttp v0.5.2
github.com/hashicorp/terraform-json v0.14.0
github.com/hashicorp/terraform-plugin-sdk/v2 v2.24.0
github.com/hashicorp/terraform-provider-google v1.20.1-0.20230310215058-7f8a5aa87cc0
github.com/hashicorp/terraform-provider-google v1.20.1-0.20230311000500-91bcded350e0
github.com/mitchellh/go-homedir v1.1.0
github.com/pkg/errors v0.9.1
github.com/sirupsen/logrus v1.9.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -514,8 +514,8 @@ github.com/hashicorp/terraform-plugin-log v0.7.0 h1:SDxJUyT8TwN4l5b5/VkiTIaQgY6R
github.com/hashicorp/terraform-plugin-log v0.7.0/go.mod h1:p4R1jWBXRTvL4odmEkFfDdhUjHf9zcs/BCoNHAc7IK4=
github.com/hashicorp/terraform-plugin-sdk/v2 v2.24.0 h1:FtCLTiTcykdsURXPt/ku7fYXm3y19nbzbZcUxHx9RbI=
github.com/hashicorp/terraform-plugin-sdk/v2 v2.24.0/go.mod h1:80wf5oad1tW+oLnbXS4UTYmDCrl7BuN1Q+IA91X1a4Y=
github.com/hashicorp/terraform-provider-google v1.20.1-0.20230310215058-7f8a5aa87cc0 h1:14sguYoQ9MnCkLszWVqqOSF8p7qS4LTPCFVi4mX8EEg=
github.com/hashicorp/terraform-provider-google v1.20.1-0.20230310215058-7f8a5aa87cc0/go.mod h1:Me09EooskxD1HNA2k+14YdLghnF8lt2HOda03gBkNpc=
github.com/hashicorp/terraform-provider-google v1.20.1-0.20230311000500-91bcded350e0 h1:VVzPZHhQz4KYlTpuWLtYTLzFg+jwXf8vUjLhodU7nzM=
github.com/hashicorp/terraform-provider-google v1.20.1-0.20230311000500-91bcded350e0/go.mod h1:Me09EooskxD1HNA2k+14YdLghnF8lt2HOda03gBkNpc=
github.com/hashicorp/terraform-registry-address v0.1.0 h1:W6JkV9wbum+m516rCl5/NjKxCyTVaaUBbzYcMzBDO3U=
github.com/hashicorp/terraform-registry-address v0.1.0/go.mod h1:EnyO2jYO6j29DTHbJcm00E5nQTFeTtyZH3H5ycydQ5A=
github.com/hashicorp/terraform-svchost v0.0.0-20200729002733-f050f53b9734 h1:HKLsbzeOsfXmKNpr3GiT18XAblV0BjCbzL8KQAMZGa0=
Expand Down
1 change: 1 addition & 0 deletions testdata/templates/example_bigquery_dataset.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"discovery_name": "Dataset",
"parent": "//cloudresourcemanager.googleapis.com/projects/{{.Provider.project}}",
"data": {
"friendlyName": "",
"datasetReference": {
"datasetId": "test-dataset"
},
Expand Down
3 changes: 2 additions & 1 deletion testdata/templates/example_bigquery_dataset_iam_binding.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
"labels": {
"env": "dev"
},
"location": "EU"
"location": "EU",
"friendlyName": ""
}
},
"iam_policy": {
Expand Down
3 changes: 2 additions & 1 deletion testdata/templates/example_bigquery_dataset_iam_member.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
"labels": {
"env": "dev"
},
"location": "EU"
"location": "EU",
"friendlyName": ""
}
},
"iam_policy": {
Expand Down
3 changes: 2 additions & 1 deletion testdata/templates/example_bigquery_dataset_iam_policy.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
"labels": {
"env": "dev"
},
"location": "EU"
"location": "EU",
"friendlyName": ""
}
},
"iam_policy": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"datasetReference": {
"datasetId": "example_dataset"
},
"location": "US"
"location": "US",
"friendlyName": ""
}
},
"iam_policy": {
Expand Down

0 comments on commit e42a241

Please sign in to comment.