terraform: provisioner config is properly interpolated
This commit is contained in:
parent
ae68cf1705
commit
10e96ad72d
|
@ -2137,7 +2137,7 @@ func TestContext2Validate_provisionerConfig_good(t *testing.T) {
|
||||||
if c == nil {
|
if c == nil {
|
||||||
t.Fatalf("missing resource config for provisioner")
|
t.Fatalf("missing resource config for provisioner")
|
||||||
}
|
}
|
||||||
return nil, nil
|
return nil, c.CheckSet([]string{"command"})
|
||||||
}
|
}
|
||||||
c := testContext2(t, &ContextOpts{
|
c := testContext2(t, &ContextOpts{
|
||||||
Module: m,
|
Module: m,
|
||||||
|
|
|
@ -3,5 +3,7 @@ provider "aws" {
|
||||||
}
|
}
|
||||||
|
|
||||||
resource "aws_instance" "test" {
|
resource "aws_instance" "test" {
|
||||||
provisioner "shell" {}
|
provisioner "shell" {
|
||||||
|
command = "foo"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -137,6 +137,10 @@ func (n *graphNodeExpandedResource) EvalTree() EvalNode {
|
||||||
vseq.Nodes = append(vseq.Nodes, &EvalGetProvisioner{
|
vseq.Nodes = append(vseq.Nodes, &EvalGetProvisioner{
|
||||||
Name: p.Type,
|
Name: p.Type,
|
||||||
Output: &provisioner,
|
Output: &provisioner,
|
||||||
|
}, &EvalInterpolate{
|
||||||
|
Config: p.RawConfig,
|
||||||
|
Resource: resource,
|
||||||
|
Output: &resourceConfig,
|
||||||
}, &EvalValidateProvisioner{
|
}, &EvalValidateProvisioner{
|
||||||
Provisioner: &provisioner,
|
Provisioner: &provisioner,
|
||||||
Config: &resourceConfig,
|
Config: &resourceConfig,
|
||||||
|
|
Loading…
Reference in New Issue