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:
Mitchell Hashimoto 2016-10-20 22:51:06 -07:00
parent ac9a049d19
commit db6d87b16c
No known key found for this signature in database
GPG Key ID: 744E147AA52F5B0A
1 changed files with 3 additions and 3 deletions

View File

@ -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
}, },