terraform: disable destroy mode for flattened nodes

This commit is contained in:
Mitchell Hashimoto 2015-05-01 18:44:07 -07:00
parent bbb065d1ad
commit 542ddb881a
1 changed files with 7 additions and 0 deletions

View File

@ -267,6 +267,13 @@ func (n *GraphNodeConfigResourceFlat) ProvidedBy() []string {
prefix)
}
// GraphNodeDestroyable impl.
func (n *GraphNodeConfigResourceFlat) DestroyNode(GraphNodeDestroyMode) GraphNodeDestroy {
// Disable destroy mode for flattened resources since we already
// did this within the original subgraph.
return nil
}
// graphNodeResourceDestroy represents the logical destruction of a
// resource. This node doesn't mean it will be destroyed for sure, but
// instead that if a destroy were to happen, it must happen at this point.