terraform: interpolation for multi-var checks both ".0" and "" suffix
This commit is contained in:
parent
9ac4ee4b52
commit
7c2c9b82a3
|
@ -1783,6 +1783,8 @@ func TestContext2Apply_multiVar(t *testing.T) {
|
|||
t.Fatalf("err: %s", err)
|
||||
}
|
||||
|
||||
t.Logf("End state: %s", state.String())
|
||||
|
||||
actual := state.RootModule().Outputs["output"]
|
||||
if actual == nil {
|
||||
t.Fatal("missing output")
|
||||
|
|
|
@ -37,6 +37,10 @@ func (n *NodeApplyableOutput) ReferenceableName() []string {
|
|||
func (n *NodeApplyableOutput) References() []string {
|
||||
var result []string
|
||||
result = append(result, ReferencesFromConfig(n.Config.RawConfig)...)
|
||||
for _, v := range result {
|
||||
result = append(result, v+".destroy")
|
||||
}
|
||||
|
||||
return result
|
||||
}
|
||||
|
||||
|
|
|
@ -30,7 +30,12 @@ func (n *NodeDestroyResource) CreateBeforeDestroy() bool {
|
|||
|
||||
// GraphNodeReferenceable, overriding NodeAbstractResource
|
||||
func (n *NodeDestroyResource) ReferenceableName() []string {
|
||||
return nil
|
||||
result := n.NodeAbstractResource.ReferenceableName()
|
||||
for i, v := range result {
|
||||
result[i] = v + ".destroy"
|
||||
}
|
||||
|
||||
return result
|
||||
}
|
||||
|
||||
// GraphNodeReferencer, overriding NodeAbstractResource
|
||||
|
|
Loading…
Reference in New Issue