mirror of
https://github.com/opentffoundation/opentf.git
synced 2026-05-26 22:02:25 -04:00
We now require a provider to populate all of its defaults -- including unknown value placeholders -- during PlanResourceChange. That means the mock provider for testing "terraform show -json" must now manage the population of the computed "id" attribute during plan. To make this logic a little easier, we also change the ApplyResourceChange implementation to fill in a non-null id, since that makes it easier for the mock PlanResourceChange to recognize when it needs to populate that default value during an update.
39 lines
751 B
JSON
39 lines
751 B
JSON
{
|
|
"version": 4,
|
|
"terraform_version": "0.12.0",
|
|
"serial": 7,
|
|
"lineage": "configuredUnchanged",
|
|
"outputs": {},
|
|
"resources": [
|
|
{
|
|
"mode": "managed",
|
|
"type": "test_instance",
|
|
"name": "test",
|
|
"provider": "provider.test",
|
|
"instances": [
|
|
{
|
|
"schema_version": 0,
|
|
"attributes": {
|
|
"ami": "foo",
|
|
"id": "placeholder"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"mode": "managed",
|
|
"type": "test_instance",
|
|
"name": "test-delete",
|
|
"provider": "provider.test",
|
|
"instances": [
|
|
{
|
|
"schema_version": 0,
|
|
"attributes": {
|
|
"ami": "foo",
|
|
"id": "placeholder"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
} |