From 5c131e8a7e1771b1562958903fdb6f4f34e9c282 Mon Sep 17 00:00:00 2001 From: mattm-fugue Date: Wed, 11 Aug 2021 11:32:48 -0500 Subject: [PATCH 1/2] Remove auth_string from Read due to permissions errors --- google/resource_redis_instance.go | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/google/resource_redis_instance.go b/google/resource_redis_instance.go index 1eb615875d8..9a5d5d20c04 100644 --- a/google/resource_redis_instance.go +++ b/google/resource_redis_instance.go @@ -402,17 +402,17 @@ func resourceRedisInstanceRead(d *schema.ResourceData, meta interface{}) error { return handleNotFoundError(err, d, fmt.Sprintf("RedisInstance %q", d.Id())) } - res, err = resourceRedisInstanceDecoder(d, meta, res) - if err != nil { - return err - } - - if res == nil { - // Decoding the object has resulted in it being gone. It may be marked deleted - log.Printf("[DEBUG] Removing RedisInstance because it no longer exists.") - d.SetId("") - return nil - } + // res, err = resourceRedisInstanceDecoder(d, meta, res) + // if err != nil { + // return err + // } + + // if res == nil { + // // Decoding the object has resulted in it being gone. It may be marked deleted + // log.Printf("[DEBUG] Removing RedisInstance because it no longer exists.") + // d.SetId("") + // return nil + // } if err := d.Set("project", project); err != nil { return fmt.Errorf("Error reading Instance: %s", err) @@ -878,7 +878,7 @@ func resourceRedisInstanceDecoder(d *schema.ResourceData, meta interface{}, res } if err := d.Set("auth_string", res["authString"]); err != nil { - return nil, fmt.Errorf("Error reading Instance: %s", err) + return nil, fmt.Errorf("Er2ror reading Instance: %s", err) } } } else { From fb9b9f97ceb51cec05de67d97c268cbedbe6bc42 Mon Sep 17 00:00:00 2001 From: mattm-fugue Date: Wed, 11 Aug 2021 11:39:53 -0500 Subject: [PATCH 2/2] Remove accidental addition --- google/resource_redis_instance.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/google/resource_redis_instance.go b/google/resource_redis_instance.go index 9a5d5d20c04..9d3713543db 100644 --- a/google/resource_redis_instance.go +++ b/google/resource_redis_instance.go @@ -878,7 +878,7 @@ func resourceRedisInstanceDecoder(d *schema.ResourceData, meta interface{}, res } if err := d.Set("auth_string", res["authString"]); err != nil { - return nil, fmt.Errorf("Er2ror reading Instance: %s", err) + return nil, fmt.Errorf("Error reading Instance: %s", err) } } } else {