Deploy CLI Updating Differences or All the Configuration

Problem statement

This post addresses the following question:

  • Is the Deploy CLI updating every content on the configuration file, or does it check the differences?

Cause

In most cases, the Deploy CLI will perform an update of all resources under its purview. The management APIs are idempotent AFAIK, so it is inconsequential whether an API update is made to those resources or not. This behavior is intentional because there could be configuration drift to these resources that occur out-of-band. Also, the Deploy CLI’s diff’ing mechanism is fairly primitive, do not expect it to reconcile so precisely.

Solution

If just a single resource should be modified, only include that resource in the Deploy CLI configuration but make sure to have deletion disabled.