terraform: orphan resources in old graph need unique ID
This commit is contained in:
parent
d27c8fbbbc
commit
fa25a3051b
|
@ -435,7 +435,7 @@ func (c *Context) Apply() (*State, error) {
|
|||
}
|
||||
|
||||
// Walk the graph
|
||||
walker, err := c.walk(real, shadow, operation)
|
||||
walker, err := c.walk(real, real, operation)
|
||||
if len(walker.ValidationErrors) > 0 {
|
||||
err = multierror.Append(err, walker.ValidationErrors...)
|
||||
}
|
||||
|
|
|
@ -510,7 +510,7 @@ func (p *shadowResourceProviderShadow) Apply(
|
|||
p.ErrorLock.Lock()
|
||||
defer p.ErrorLock.Unlock()
|
||||
p.Error = multierror.Append(p.Error, fmt.Errorf(
|
||||
"Unknown 'apply' shadow value: %#v", raw))
|
||||
"Unknown 'apply' shadow value for %q: %#v", key, raw))
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
|
|
|
@ -209,6 +209,8 @@ func (n *graphNodeOrphanResource) EvalTree() EvalNode {
|
|||
|
||||
// Build instance info
|
||||
info := &InstanceInfo{Id: n.ResourceKey.String(), Type: n.ResourceKey.Type}
|
||||
info.uniqueExtra = "destroy"
|
||||
|
||||
seq.Nodes = append(seq.Nodes, &EvalInstanceInfo{Info: info})
|
||||
|
||||
// Each resource mode has its own lifecycle
|
||||
|
|
Loading…
Reference in New Issue