Jonathan Rose
08/12/2025, 3:54 PMGabriela Campana (Cloud Posse)
08/12/2025, 8:19 PMAndriy Knysh (Cloud Posse)
08/12/2025, 8:32 PMcomponents:
terraform:
infra/vpc:
metadata:
component: infra/vpc
backend:
s3:
workspace_key_prefix: infra-vpc
settings:
# Validation
# Supports JSON Schema and OPA policies
# All validation steps must succeed to allow the component to be provisioned
validation:
validate-infra-vpc-component-with-jsonschema:
schema_type: jsonschema
# 'schema_path' can be an absolute path or a path relative to 'schemas.jsonschema.base_path' defined in `atmos.yaml`
schema_path: "vpc/validate-infra-vpc-component.json"
description: Validate 'infra/vpc' component variables using JSON Schema
check-infra-vpc-component-config-with-opa-policy:
schema_type: opa
# 'schema_path' can be an absolute path or a path relative to 'schemas.opa.base_path' defined in `atmos.yaml`
schema_path: "vpc/validate-infra-vpc-component.rego"
# An array 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`
# In this example, we have the additional Rego modules in `stacks/schemas/opa/catalog/constants`
module_paths:
- "catalog/constants"
description: Check 'infra/vpc' component configuration using OPA policy
# Set `disabled` to `true` to skip the validation step
# `disabled` is set to `false` by default, the step is allowed if `disabled` is not declared
disabled: false
# Validation timeout in seconds
timeout: 10Andriy Knysh (Cloud Posse)
08/12/2025, 8:33 PMsettings is a first-class section (similar to vars) meaning it can be defined at any level (org, tenant, region, account, base component, component)Andriy Knysh (Cloud Posse)
08/12/2025, 8:34 PMsettings (e.g. settings.validation) are inherited from all the top-level down to the component levelAndriy Knysh (Cloud Posse)
08/12/2025, 8:34 PMAndriy Knysh (Cloud Posse)
08/12/2025, 8:35 PMAndriy Knysh (Cloud Posse)
08/12/2025, 8:43 PMcheck-infra-vpc-component-config-with-opa-policy in the example above) - this will completely override the schema (and not merge the map keys)Jonathan Rose
08/13/2025, 8:57 AM