Merge pull request #21979 from bpetermannS11/fix-crash-21896

Fix for crash #21896
This commit is contained in:
James Bardin 2019-07-08 14:44:50 -04:00 committed by GitHub
commit 3631c16831
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -696,7 +696,7 @@ func (d *evaluationStateData) getResourceInstancesAll(addr addrs.Resource, rng t
ty := schema.ImpliedType()
key := addrs.IntKey(i)
is, exists := rs.Instances[key]
if exists {
if exists && is.Current != nil {
instAddr := addr.Instance(key).Absolute(d.ModulePath)
// Prefer pending value in plan if present. See getResourceInstanceSingle