core: Correct schema for TestContext2Apply_issue5254

This test is now failing due to the fact that WritePlan is currently
disabled pending a rewrite. This will be addressed in a subsequent commit.
This commit is contained in:
Martin Atkins 2018-06-01 15:02:26 -07:00
parent 432331e484
commit b99b31ebea
3 changed files with 14 additions and 5 deletions

View File

@ -8615,9 +8615,18 @@ func TestContext2Apply_issue7824(t *testing.T) {
p.ResourcesReturn = append(p.ResourcesReturn, ResourceType{
Name: "template_file",
})
p.ApplyFn = testApplyFn
p.DiffFn = testDiffFn
p.GetSchemaReturn = &ProviderSchema{
ResourceTypes: map[string]*configschema.Block{
"template_file": {
Attributes: map[string]*configschema.Attribute{
"template": {Type: cty.String, Optional: true},
"__template_requires_new": {Type: cty.Bool, Optional: true},
},
},
},
}
// Apply cleanly step 0
ctx := testContext2(t, &ContextOpts{

View File

@ -3,7 +3,7 @@ variable "c" {
}
resource "template_file" "parent" {
count = "${var.c}"
count = var.c
template = "Hi"
}

View File

@ -3,11 +3,11 @@ variable "c" {
}
resource "template_file" "parent" {
count = "${var.c}"
count = var.c
template = "Hi"
}
resource "template_file" "child" {
template = "${join(",", template_file.parent.*.template)}"
__template_requires_new = 1
template = join(",", template_file.parent.*.template)
__template_requires_new = true
}