f848090479
As documented in issue #616, the inputs/defaults/outputs model we have today has fundamental problems. The crux of the issue is that our current design requires that defaults present in the old state of a resource are applied to the new inputs for that resource. Unfortunately, it is not possible for the engine to decide which defaults remain applicable and which do not; only the provider has that knowledge. These changes take a more tactical approach to resolving this issue than that originally proposed in #616 that avoids breaking compatibility with existing checkpoints. Rather than treating the Pulumi inputs as the provider input properties for a resource, these inputs are first translated by `Check`. In order to accommodate provider defaults that were chosen for the old resource but should not change for the new, `Check` now takes the old provider inputs as well as the new Pulumi inputs. Rather than the Pulumi inputs and provider defaults, the provider inputs returned by `Check` are recorded in the checkpoint file. Put simply, these changes remove defaults as a first-class concept (except inasmuch as is required to retain the ability to read old checkpoint files) and move the responsibilty for manging and merging defaults into the provider that supplies them. Fixes #616. |
||
---|---|---|
.. | ||
config | ||
deploy | ||
idl | ||
plugin | ||
provider | ||
stack | ||
testdata | ||
asset.go | ||
asset_test.go | ||
errors.go | ||
properties.go | ||
properties_diff.go | ||
properties_diff_test.go | ||
properties_test.go | ||
resource_goal.go | ||
resource_id.go | ||
resource_id_test.go | ||
resource_state.go | ||
status.go | ||
urn.go | ||
urn_test.go |