mirror of https://github.com/hashicorp/terraform
This was caught by an acceptance test. We've now added a unit test. When refreshing, an orphan (no config) data source should just be deleted.pull/11680/head
parent
f1803ba4b6
commit
ebb129f051
@ -0,0 +1,22 @@
|
||||
package terraform
|
||||
|
||||
// NodeDestroyableDataResource represents a resource that is "plannable":
|
||||
// it is ready to be planned in order to create a diff.
|
||||
type NodeDestroyableDataResource struct {
|
||||
*NodeAbstractResource
|
||||
}
|
||||
|
||||
// GraphNodeEvalable
|
||||
func (n *NodeDestroyableDataResource) EvalTree() EvalNode {
|
||||
addr := n.NodeAbstractResource.Addr
|
||||
|
||||
// stateId is the ID to put into the state
|
||||
stateId := addr.stateId()
|
||||
|
||||
// Just destroy it.
|
||||
var state *InstanceState
|
||||
return &EvalWriteState{
|
||||
Name: stateId,
|
||||
State: &state, // state is nil here
|
||||
}
|
||||
}
|
||||
Loading…
Reference in new issue