terraform: destroy node should understand data sources
This makes the new destroy nodes undestand data sourcs and call the correct apply function.
This commit is contained in:
parent
ac9a049d19
commit
db6d87b16c
|
@ -2,6 +2,8 @@ package terraform
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
|
"github.com/hashicorp/terraform/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
// NodeDestroyResource represents a resource that is to be destroyed.
|
// NodeDestroyResource represents a resource that is to be destroyed.
|
||||||
|
@ -147,11 +149,9 @@ func (n *NodeDestroyResource) EvalTree() EvalNode {
|
||||||
// Make sure we handle data sources properly.
|
// Make sure we handle data sources properly.
|
||||||
&EvalIf{
|
&EvalIf{
|
||||||
If: func(ctx EvalContext) (bool, error) {
|
If: func(ctx EvalContext) (bool, error) {
|
||||||
/* TODO: data source
|
if n.Config.Mode == config.DataResourceMode {
|
||||||
if n.Resource.Mode == config.DataResourceMode {
|
|
||||||
return true, nil
|
return true, nil
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|
||||||
return false, nil
|
return false, nil
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue