Skip to content

Managing Configuration as Code

This tutorial walks you through the core config workflow: pull configuration from a Vault, edit a component, preview the change, and push it back.

If you have not authenticated yet, see Authentication to connect the CLI to your Vault. Then pull all configuration:

vault config pull

The first pull creates the workspace structure automatically. components/, javasdk/, custom_pages/, and .vault/ directories are created if they do not already exist. The CLI then pulls all components, Vault Java SDK classes, and Custom Pages from your active Vault. Components are written to components/<Type>/<name>/. Large or structured attribute values are extracted into sidecar files (.xml, .json, .txt) so that each file produces clean, readable diffs in source control.

Open a component file in your editor. For example:

components/Picklist/color__c/color__c.mdl

Edit the MDL as needed, then save the file.

Run vault config push --dry-run to see what would be deployed without making any changes:

vault config push --dry-run

This shows an unvalidated diff of what would change. It does not contact Vault for validation.

Example output:

~ update  components/Picklist/color__c.mdl   (1 entry added)

  Summary: 1 update

Deploy the change to your Vault:

vault config push

The CLI deploys only what changed. If the remote Vault was modified since your last pull, the push stops. Run vault config pull to reconcile before pushing again.

For the full options reference, including --dns and --dry-run, see vault config.