Comment explaning why we can have deleted resources in the state
This commit is contained in:
parent
8e58be37c7
commit
04bf00f0c6
|
@ -281,6 +281,8 @@ func resourceArmRedisCacheRead(d *schema.ResourceData, meta interface{}) error {
|
|||
name := id.Path["Redis"]
|
||||
|
||||
resp, err := client.Get(resGroup, name)
|
||||
|
||||
// covers if the resource has been deleted outside of TF, but is still in the state
|
||||
if resp.StatusCode == http.StatusNotFound {
|
||||
d.SetId("")
|
||||
return nil
|
||||
|
|
Loading…
Reference in New Issue