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.Fatalf("err: %s", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
t.Logf("End state: %s", state.String())
|
||||||
|
|
||||||
actual := state.RootModule().Outputs["output"]
|
actual := state.RootModule().Outputs["output"]
|
||||||
if actual == nil {
|
if actual == nil {
|
||||||
t.Fatal("missing output")
|
t.Fatal("missing output")
|
||||||
|
|
|
@ -37,6 +37,10 @@ func (n *NodeApplyableOutput) ReferenceableName() []string {
|
||||||
func (n *NodeApplyableOutput) References() []string {
|
func (n *NodeApplyableOutput) References() []string {
|
||||||
var result []string
|
var result []string
|
||||||
result = append(result, ReferencesFromConfig(n.Config.RawConfig)...)
|
result = append(result, ReferencesFromConfig(n.Config.RawConfig)...)
|
||||||
|
for _, v := range result {
|
||||||
|
result = append(result, v+".destroy")
|
||||||
|
}
|
||||||
|
|
||||||
return result
|
return result
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,12 @@ func (n *NodeDestroyResource) CreateBeforeDestroy() bool {
|
||||||
|
|
||||||
// GraphNodeReferenceable, overriding NodeAbstractResource
|
// GraphNodeReferenceable, overriding NodeAbstractResource
|
||||||
func (n *NodeDestroyResource) ReferenceableName() []string {
|
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
|
// GraphNodeReferencer, overriding NodeAbstractResource
|
||||||
|
|
Loading…
Reference in New Issue