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 (
"fmt"
"github.com/hashicorp/terraform/config"
)
// 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.
&EvalIf{
If: func(ctx EvalContext) (bool, error) {
/* TODO: data source
if n.Resource.Mode == config.DataResourceMode {
if n.Config.Mode == config.DataResourceMode {
return true, nil
}
*/
return false, nil
},