Skip to main content

atmos validate component

purpose

Use this command to validate an Atmos component in a stack using JSON Schema and OPA policies.

atmos validate component --help

Usage

Execute the validate component command like this:

atmos validate component <component> -s <stack> [options]

This command validates an Atmos component in a stack using JSON Schema and OPA policies.

tip

Run atmos validate component --help to see all the available options

Examples

atmos validate component infra/vpc -s tenant1-ue2-dev
atmos validate component infra/vpc -s tenant1-ue2-dev --schema-path vpc/validate-infra-vpc-component.json --schema-type jsonschema
atmos validate component infra/vpc -s tenant1-ue2-dev --schema-path vpc/validate-infra-vpc-component.rego --schema-type opa
atmos validate component infra/vpc -s tenant1-ue2-dev --schema-path vpc/validate-infra-vpc-component.rego --schema-type opa --module-paths catalog/constants
atmos validate component infra/vpc -s tenant1-ue2-dev --schema-path vpc/validate-infra-vpc-component.rego --schema-type opa --module-paths catalog
atmos validate component infra/vpc -s tenant1-ue2-dev --timeout 15

Arguments

ArgumentDescriptionRequired
componentAtmos componentyes

Flags

FlagDescriptionAliasRequired
--stackAtmos stack-syes
--schema-pathPath to the schema file.
Can be an absolute path or a path relative to schemas.jsonschema.base_path
and schemas.opa.base_path defined in atmos.yaml
no
--schema-typeSchema type: jsonschema or opano
--module-pathsComma-separated string of filesystem paths (folders or individual files) to the additional modules
for schema validation. Each path can be an absolute path or a path relative to
schemas.opa.base_path defined in atmos.yaml
no
--timeoutValidation timeout in seconds. Can also be specified in settings.validation component config. If not provided, timeout of 20 seconds is used by defaultno