core: context plan tests update wanted output for new behavior
Previously Terraform Core was unaware of the structure of a resource type schema and so the strange behavior of our testDiffFn caused some attributes to not appear at all in the result. With core now more aware, it "fills in" these missing items before calling, and as a result they now appear in the diff even with the testDiffFn. In real code, where helper/schema is constructing diffs, this situation doesn't arise because the framework always produces schema-compatible diffs.
This commit is contained in:
parent
602b59cdc4
commit
0ac663bb2b
|
@ -1021,6 +1021,8 @@ CREATE: aws_instance.bar
|
||||||
foo: "" => "<computed>"
|
foo: "" => "<computed>"
|
||||||
type: "" => "aws_instance"
|
type: "" => "aws_instance"
|
||||||
CREATE: aws_instance.foo
|
CREATE: aws_instance.foo
|
||||||
|
compute: "" => "foo"
|
||||||
|
compute_value: "" => "<computed>"
|
||||||
foo: "" => "<computed>"
|
foo: "" => "<computed>"
|
||||||
num: "" => "2"
|
num: "" => "2"
|
||||||
type: "" => "aws_instance"
|
type: "" => "aws_instance"
|
||||||
|
@ -1069,9 +1071,13 @@ CREATE: aws_instance.bar
|
||||||
foo: "" => "<computed>"
|
foo: "" => "<computed>"
|
||||||
type: "" => "aws_instance"
|
type: "" => "aws_instance"
|
||||||
CREATE: aws_instance.foo.0
|
CREATE: aws_instance.foo.0
|
||||||
|
compute: "" => "ip.#"
|
||||||
|
compute_value: "" => "<computed>"
|
||||||
ip.#: "" => "<computed>"
|
ip.#: "" => "<computed>"
|
||||||
type: "" => "aws_instance"
|
type: "" => "aws_instance"
|
||||||
CREATE: aws_instance.foo.1
|
CREATE: aws_instance.foo.1
|
||||||
|
compute: "" => "ip.#"
|
||||||
|
compute_value: "" => "<computed>"
|
||||||
ip.#: "" => "<computed>"
|
ip.#: "" => "<computed>"
|
||||||
type: "" => "aws_instance"
|
type: "" => "aws_instance"
|
||||||
|
|
||||||
|
@ -1431,6 +1437,8 @@ const testTerraformPlanModuleInputComputedStr = `
|
||||||
DIFF:
|
DIFF:
|
||||||
|
|
||||||
CREATE: aws_instance.bar
|
CREATE: aws_instance.bar
|
||||||
|
compute: "" => "foo"
|
||||||
|
compute_value: "" => "<computed>"
|
||||||
foo: "" => "<computed>"
|
foo: "" => "<computed>"
|
||||||
type: "" => "aws_instance"
|
type: "" => "aws_instance"
|
||||||
|
|
||||||
|
@ -1539,6 +1547,8 @@ CREATE: aws_instance.bar
|
||||||
|
|
||||||
module.child:
|
module.child:
|
||||||
CREATE: aws_instance.foo
|
CREATE: aws_instance.foo
|
||||||
|
compute: "" => "foo"
|
||||||
|
compute_value: "" => "<computed>"
|
||||||
foo: "" => "<computed>"
|
foo: "" => "<computed>"
|
||||||
type: "" => "aws_instance"
|
type: "" => "aws_instance"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue