github.com/muratcelep/terraform@v1.1.0-beta2-not-internal-4/not-internal/terraform/node_data_destroy.go (about) 1 package terraform 2 3 import ( 4 "log" 5 6 "github.com/muratcelep/terraform/not-internal/tfdiags" 7 ) 8 9 // NodeDestroyableDataResourceInstance represents a resource that is "destroyable": 10 // it is ready to be destroyed. 11 type NodeDestroyableDataResourceInstance struct { 12 *NodeAbstractResourceInstance 13 } 14 15 var ( 16 _ GraphNodeExecutable = (*NodeDestroyableDataResourceInstance)(nil) 17 ) 18 19 // GraphNodeExecutable 20 func (n *NodeDestroyableDataResourceInstance) Execute(ctx EvalContext, op walkOperation) tfdiags.Diagnostics { 21 log.Printf("[TRACE] NodeDestroyableDataResourceInstance: removing state object for %s", n.Addr) 22 ctx.State().SetResourceInstanceCurrent(n.Addr, nil, n.ResolvedProvider) 23 return nil 24 }