21 lines
615 B
Go
21 lines
615 B
Go
package terraform
|
|
|
|
import "log"
|
|
|
|
// NodeDestroyableDataResourceInstance represents a resource that is "destroyable":
|
|
// it is ready to be destroyed.
|
|
type NodeDestroyableDataResourceInstance struct {
|
|
*NodeAbstractResourceInstance
|
|
}
|
|
|
|
var (
|
|
_ GraphNodeExecutable = (*NodeDestroyableDataResourceInstance)(nil)
|
|
)
|
|
|
|
// GraphNodeExecutable
|
|
func (n *NodeDestroyableDataResourceInstance) Execute(ctx EvalContext, op walkOperation) error {
|
|
log.Printf("[TRACE] NodeDestroyableDataResourceInstance: removing state object for %s", n.Addr)
|
|
ctx.State().SetResourceInstanceCurrent(n.Addr, nil, n.ResolvedProvider)
|
|
return nil
|
|
}
|