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, from an empty directory, 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, along with a .gitignore that excludes .vault/ and a starter .vdxignore. The CLI then pulls all components, Vault Java SDK classes, and Custom Pages from your active Vault. Components are written to components/<Type>/<name>/. Subcomponents, such as picklist entries or object fields, are written to their own files, and large or structured attribute values are extracted into sidecar files (.xml, .json, .txt, .as) so that each file produces clean, readable diffs in source control.

We recommend committing the workspace to source control after each pull.

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 command lists every component, class, and Custom Page that would be added, modified, or deleted in the vault, followed by number of updated and unchanged components.

Example output:

[dry run]   MODIFIED Picklist.color__c
[dry run] Pushed config to myorg.veevavault.com.
[dry run] Components: 1 updated, 1520 unchanged.

Deploy the change to your Vault:

vault config push

The CLI deploys only what differs between your workspace and the vault. Push does not check whether the vault changed since your last pull. Any change made directly in the vault is overwritten, and anything in the vault that is not in your workspace is deleted after you confirm. Review the --dry-run output before every push.

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