pulumi/cmd
Pat Gavlin 6e5c4a38d8
Defer all diffs to resource providers. (#2849)
Thse changes make a subtle but critical adjustment to the process the
Pulumi engine uses to determine whether or not a difference exists
between a resource's actual and desired states, and adjusts the way this
difference is calculated and displayed accordingly.

Today, the Pulumi engine get the first chance to decide whether or not
there is a difference between a resource's actual and desired states. It
does this by comparing the current set of inputs for a resource (i.e.
the inputs from the running Pulumi program) with the last set of inputs
used to update the resource. If there is no difference between the old
and new inputs, the engine decides that no change is necessary without
consulting the resource's provider. Only if there are changes does the
engine consult the resource's provider for more information about the
difference. This can be problematic for a number of reasons:

- Not all providers do input-input comparison; some do input-state
  comparison
- Not all providers are able to update the last deployed set of inputs
  when performing a refresh
- Some providers--either intentionally or due to bugs--may see changes
  in resources whose inputs have not changed

All of these situations are confusing at the very least, and the first
is problematic with respect to correctness. Furthermore, the display
code only renders diffs it observes rather than rendering the diffs
observed by the provider, which can obscure the actual changes detected
at runtime.

These changes address both of these issues:
- Rather than comparing the current inputs against the last inputs
  before calling a resource provider's Diff function, the engine calls
  the Diff function in all cases.
- Providers may now return a list of properties that differ between the
  requested and actual state and the way in which they differ. This
  information will then be used by the CLI to render the diff
  appropriately. A provider may also indicate that a particular diff is
  between old and new inputs rather than old state and new inputs.

Fixes #2453.
2019-07-01 12:34:19 -07:00
..
cancel.go Don't print error prefix when a confirmation prompt is declined 2019-03-26 15:17:18 -07:00
config.go Do not prompt for passphrase multiple times 2019-05-14 23:35:27 -07:00
config_test.go Tidy up some data structures (#2135) 2018-11-01 08:28:11 -07:00
crypto.go Eagerly validate secrets-provider option 2019-05-15 00:02:29 -07:00
crypto_http.go Use "passphrase" and "service" instead of "local" and "cloud" 2019-05-10 17:07:52 -07:00
crypto_local.go Allow using the passphrase secrets manager with the pulumi service 2019-05-10 17:07:52 -07:00
destroy.go Defer all diffs to resource providers. (#2849) 2019-07-01 12:34:19 -07:00
errors.go Use result.Result in more places. (#2568) 2019-03-19 16:21:50 -07:00
gen_completion.go Reworked gen-bash-completion into a more generic completion command (#1967) 2018-09-24 06:25:16 -07:00
gen_markdown.go Improvements to the gen-markdown command for Hugo (#2764) 2019-05-23 10:37:10 -07:00
history.go Add secrets managers for passphrase and service based encryption 2019-05-10 17:07:52 -07:00
login.go Backend setting in project config 2019-06-13 20:02:03 +03:00
logout.go Backend setting in project config 2019-06-13 20:02:03 +03:00
logs.go Do not prompt for passphrase multiple times 2019-05-14 23:35:27 -07:00
logs_test.go Add license headers 2018-05-22 15:02:47 -07:00
new.go Fix spelling issues 2019-05-15 08:32:49 -07:00
plugin.go Remove uses of plugins in the snapshot (#2662) 2019-04-23 09:53:44 -07:00
plugin_install.go Use server information from NodeJS host for fetching plugins 2019-06-03 09:31:18 -07:00
plugin_ls.go Add --json to pulumi plugin ls 2019-01-22 15:42:29 -08:00
plugin_rm.go Refactor display logic out of pkg/backend/filestate 2018-09-05 07:33:18 -07:00
preview.go Defer all diffs to resource providers. (#2849) 2019-07-01 12:34:19 -07:00
pulumi.go Make pulumi query a "debug command" 2019-05-02 18:08:08 -07:00
query.go Fix lint issues 2019-05-15 00:02:35 -07:00
refresh.go Defer all diffs to resource providers. (#2849) 2019-07-01 12:34:19 -07:00
stack.go Don't show secret outputs by default on the CLI 2019-05-10 17:07:52 -07:00
stack_export.go Refactor display logic out of pkg/backend/filestate 2018-09-05 07:33:18 -07:00
stack_graph.go Refactor display logic out of pkg/backend/filestate 2018-09-05 07:33:18 -07:00
stack_import.go Use existing secrets manager when roundtripping 2019-05-10 17:07:52 -07:00
stack_init.go Fix spelling issues 2019-05-15 08:32:49 -07:00
stack_ls.go Add --json to pulumi plugin ls 2019-01-22 15:42:29 -08:00
stack_output.go Fix crash in pulumi stack output when stack is empty 2019-06-11 12:58:29 -07:00
stack_output_test.go Add license headers 2018-05-22 15:02:47 -07:00
stack_rename.go Add pulumi stack rename 2019-03-19 11:04:33 -07:00
stack_rm.go Don't print error prefix when a confirmation prompt is declined 2019-03-26 15:17:18 -07:00
stack_select.go Remove pulumi archive and archive uploading code 2018-10-26 18:03:58 -07:00
stack_tag.go Add --json to pulumi config get and pulumi config 2019-01-22 10:39:37 -08:00
state.go Use existing secrets manager when roundtripping 2019-05-10 17:07:52 -07:00
state_delete.go Add a note about quoting to state delete doc (#2641) 2019-04-11 16:10:28 -06:00
state_unprotect.go Don't print error prefix when a confirmation prompt is declined 2019-03-26 15:17:18 -07:00
up.go Defer all diffs to resource providers. (#2849) 2019-07-01 12:34:19 -07:00
util.go Defer all diffs to resource providers. (#2849) 2019-07-01 12:34:19 -07:00
util_test.go Add detection of Azure Pipelines (#2705) 2019-05-07 11:49:13 -07:00
version.go Add license headers 2018-05-22 15:02:47 -07:00
whoami.go cli/whoami: Addition of the currently connected backend to whoami 2019-05-22 14:45:04 +02:00