From 04ec1a6325296e3af4dd177e47b13768c0681bd2 Mon Sep 17 00:00:00 2001 From: The Magician Date: Tue, 29 Nov 2022 10:46:14 -0800 Subject: [PATCH] display_name not in response (#6867) (#4925) * display_name not in response * use ignore_read instead Co-authored-by: Edward Sun Signed-off-by: Modular Magician Signed-off-by: Modular Magician Co-authored-by: Edward Sun --- .changelog/6867.txt | 3 +++ google-beta/resource_alloydb_instance.go | 7 ------- google-beta/resource_alloydb_instance_generated_test.go | 2 +- 3 files changed, 4 insertions(+), 8 deletions(-) create mode 100644 .changelog/6867.txt diff --git a/.changelog/6867.txt b/.changelog/6867.txt new file mode 100644 index 0000000000..ec8b531a0c --- /dev/null +++ b/.changelog/6867.txt @@ -0,0 +1,3 @@ +```release-note:bug +alloydb: fixed permdiff on `display_name` of `google_alloydb_instance` +``` diff --git a/google-beta/resource_alloydb_instance.go b/google-beta/resource_alloydb_instance.go index eb97046d14..43b087bc14 100644 --- a/google-beta/resource_alloydb_instance.go +++ b/google-beta/resource_alloydb_instance.go @@ -320,9 +320,6 @@ func resourceAlloydbInstanceRead(d *schema.ResourceData, meta interface{}) error if err := d.Set("state", flattenAlloydbInstanceState(res["state"], d, config)); err != nil { return fmt.Errorf("Error reading Instance: %s", err) } - if err := d.Set("display_name", flattenAlloydbInstanceDisplayName(res["displayName"], d, config)); err != nil { - return fmt.Errorf("Error reading Instance: %s", err) - } if err := d.Set("gce_zone", flattenAlloydbInstanceGceZone(res["gceZone"], d, config)); err != nil { return fmt.Errorf("Error reading Instance: %s", err) } @@ -569,10 +566,6 @@ func flattenAlloydbInstanceState(v interface{}, d *schema.ResourceData, config * return v } -func flattenAlloydbInstanceDisplayName(v interface{}, d *schema.ResourceData, config *Config) interface{} { - return v -} - func flattenAlloydbInstanceGceZone(v interface{}, d *schema.ResourceData, config *Config) interface{} { return v } diff --git a/google-beta/resource_alloydb_instance_generated_test.go b/google-beta/resource_alloydb_instance_generated_test.go index cad20d88c8..af0014ebe5 100644 --- a/google-beta/resource_alloydb_instance_generated_test.go +++ b/google-beta/resource_alloydb_instance_generated_test.go @@ -42,7 +42,7 @@ func TestAccAlloydbInstance_alloydbInstanceBasicExample(t *testing.T) { ResourceName: "google_alloydb_instance.default", ImportState: true, ImportStateVerify: true, - ImportStateVerifyIgnore: []string{"cluster", "instance_id", "reconciling", "update_time"}, + ImportStateVerifyIgnore: []string{"display_name", "cluster", "instance_id", "reconciling", "update_time"}, }, }, })