use provisioner attr defined in schema
This commit is contained in:
parent
41dde5fafc
commit
d9239e1f48
|
@ -5183,7 +5183,7 @@ func TestContext2Apply_provisionerDestroyModule(t *testing.T) {
|
||||||
p.ApplyFn = testApplyFn
|
p.ApplyFn = testApplyFn
|
||||||
p.DiffFn = testDiffFn
|
p.DiffFn = testDiffFn
|
||||||
pr.ApplyFn = func(rs *InstanceState, c *ResourceConfig) error {
|
pr.ApplyFn = func(rs *InstanceState, c *ResourceConfig) error {
|
||||||
val, ok := c.Config["foo"]
|
val, ok := c.Config["command"]
|
||||||
if !ok || val != "value" {
|
if !ok || val != "value" {
|
||||||
t.Fatalf("bad value for foo: %v %#v", val, c)
|
t.Fatalf("bad value for foo: %v %#v", val, c)
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@ resource "aws_instance" "foo" {
|
||||||
foo = "bar"
|
foo = "bar"
|
||||||
|
|
||||||
provisioner "shell" {
|
provisioner "shell" {
|
||||||
foo = "${var.key}"
|
command = "${var.key}"
|
||||||
when = "destroy"
|
when = "destroy"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue