mirror of
https://github.com/opentofu/opentofu.git
synced 2024-12-30 10:47:14 -06:00
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,9 +1021,11 @@ CREATE: aws_instance.bar
|
||||
foo: "" => "<computed>"
|
||||
type: "" => "aws_instance"
|
||||
CREATE: aws_instance.foo
|
||||
foo: "" => "<computed>"
|
||||
num: "" => "2"
|
||||
type: "" => "aws_instance"
|
||||
compute: "" => "foo"
|
||||
compute_value: "" => "<computed>"
|
||||
foo: "" => "<computed>"
|
||||
num: "" => "2"
|
||||
type: "" => "aws_instance"
|
||||
|
||||
STATE:
|
||||
|
||||
@ -1069,11 +1071,15 @@ CREATE: aws_instance.bar
|
||||
foo: "" => "<computed>"
|
||||
type: "" => "aws_instance"
|
||||
CREATE: aws_instance.foo.0
|
||||
ip.#: "" => "<computed>"
|
||||
type: "" => "aws_instance"
|
||||
compute: "" => "ip.#"
|
||||
compute_value: "" => "<computed>"
|
||||
ip.#: "" => "<computed>"
|
||||
type: "" => "aws_instance"
|
||||
CREATE: aws_instance.foo.1
|
||||
ip.#: "" => "<computed>"
|
||||
type: "" => "aws_instance"
|
||||
compute: "" => "ip.#"
|
||||
compute_value: "" => "<computed>"
|
||||
ip.#: "" => "<computed>"
|
||||
type: "" => "aws_instance"
|
||||
|
||||
STATE:
|
||||
|
||||
@ -1431,8 +1437,10 @@ const testTerraformPlanModuleInputComputedStr = `
|
||||
DIFF:
|
||||
|
||||
CREATE: aws_instance.bar
|
||||
foo: "" => "<computed>"
|
||||
type: "" => "aws_instance"
|
||||
compute: "" => "foo"
|
||||
compute_value: "" => "<computed>"
|
||||
foo: "" => "<computed>"
|
||||
type: "" => "aws_instance"
|
||||
|
||||
module.child:
|
||||
CREATE: aws_instance.foo
|
||||
@ -1539,8 +1547,10 @@ CREATE: aws_instance.bar
|
||||
|
||||
module.child:
|
||||
CREATE: aws_instance.foo
|
||||
foo: "" => "<computed>"
|
||||
type: "" => "aws_instance"
|
||||
compute: "" => "foo"
|
||||
compute_value: "" => "<computed>"
|
||||
foo: "" => "<computed>"
|
||||
type: "" => "aws_instance"
|
||||
|
||||
STATE:
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user