vertra template validate, which sends it to the API and creates nothing, then test it for real by creating it as a private template in your own account. Validation catches mistakes in the file; only a real deploy proves that the software boots in the sandbox.
Validate from the CLI
vertracloud.template.yaml from the folder (or the file you pass) and checks it with the API. Every finding is printed with its file, line, manifest path and code, and the command exits with a failure status when there is at least one. With --json it prints:
vertra auth login) or have VERTRA_API_KEY set. See CLI for installation.
Validate from the API
POST /v1/templates/validate takes a manifest as JSON and creates nothing. It always answers 200, with valid and the list of findings, and it needs the templates:read scope.
issues, the calculated required_plan, the sum of minimum memory in ram_min_total and a summary of each service. The body can be up to 1 MiB. See the endpoint reference.
Validate in your editor
Add this line to the first line of the manifest and a YAML-aware editor validates and autocompletes as you type:Test it as a private template
Validation does not run your software. Before you publish or open a pull request:- Create the template as private in your own account:
vertra template create .(or Save as template in the dashboard). - Use it:
vertra template deploy my-template --name test-1 --set discord_token=..., or use the dashboard wizard. Answer the questions exactly as a new user would, and try every option that turns a service on or off. - Check the healthcheck, the logs, the outputs, and that a restart keeps the data in
/appand the databases. - Try an update: raise
version, publish it, and update the app, then roll back. - Delete the test app or stack. If the deploy fails, everything the job created is removed on its own.
A template that works on your computer may still fail in the sandbox because the root is read-only, the process runs as uid 1000 and only
/app is writable. See Best practices.Validation codes
Every finding has apath (for example services.app.ram.recommended) and one of these codes. The same list appears in the details.issues of TEMPLATE_MANIFEST_INVALID when you create a template.
Errors can also come back when you create or publish the template: see Private templates and the template errors reference.