mirror of
https://github.com/opentofu/opentofu.git
synced 2024-12-30 10:47:14 -06:00
30 lines
600 B
Go
30 lines
600 B
Go
package terraform
|
|
|
|
import (
|
|
"fmt"
|
|
)
|
|
|
|
// NodeDestroyableModule represents a module destruction.
|
|
type NodeDestroyableModuleVariable struct {
|
|
PathValue []string
|
|
}
|
|
|
|
func (n *NodeDestroyableModuleVariable) Name() string {
|
|
result := "plan-destroy"
|
|
if len(n.PathValue) > 1 {
|
|
result = fmt.Sprintf("%s.%s", modulePrefixStr(n.PathValue), result)
|
|
}
|
|
|
|
return result
|
|
}
|
|
|
|
// GraphNodeSubPath
|
|
func (n *NodeDestroyableModuleVariable) Path() []string {
|
|
return n.PathValue
|
|
}
|
|
|
|
// GraphNodeEvalable
|
|
func (n *NodeDestroyableModuleVariable) EvalTree() EvalNode {
|
|
return &EvalDiffDestroyModule{Path: n.PathValue}
|
|
}
|