terraform: provisioner config is properly interpolated

This commit is contained in:
Mitchell Hashimoto 2015-02-16 19:15:14 -08:00
parent ae68cf1705
commit 10e96ad72d
3 changed files with 8 additions and 2 deletions

View File

@ -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,

View File

@ -3,5 +3,7 @@ provider "aws" {
} }
resource "aws_instance" "test" { resource "aws_instance" "test" {
provisioner "shell" {} provisioner "shell" {
command = "foo"
}
} }

View File

@ -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,