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.
1. Pull configuration
Section link for 1. Pull configurationIf you have not authenticated yet, see Authentication to connect the CLI to your Vault. Then pull all configuration:
vault config pullThe 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.
2. Edit a component
Section link for 2. Edit a componentOpen a component file in your editor. For example:
components/Picklist/color__c/color__c.mdlEdit the MDL as needed, then save the file.
3. Preview the change
Section link for 3. Preview the changeRun vault config push --dry-run to see what would be deployed without making any changes:
vault config push --dry-runThis 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 update4. Push the change
Section link for 4. Push the changeDeploy the change to your Vault:
vault config pushThe 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.