skip drift rendering for deposed resources

Deposed instances have no current state and are only scheduled for
deletion, so there is no reason to try and render drift on these
instances.
This commit is contained in:
James Bardin
2021-05-24 15:40:10 -04:00
parent aae642fb07
commit 57aa7c6025
2 changed files with 10 additions and 0 deletions

View File

@@ -374,6 +374,10 @@ func renderChangesDetectedByRefresh(before, after *states.State, schemas *terraf
}
for key, bis := range brs.Instances {
if bis.Current == nil {
// No current instance to render here
continue
}
var pis *states.ResourceInstance
if prs != nil {
pis = prs.Instance(key)