Skip to content

Commit

Permalink
Embed JSON Schema for validation of Atmos manifests inside Atmos bina…
Browse files Browse the repository at this point in the history
…ry (#925)

* updates

* updates

* updates

* updates

* updates

* updates

* updates

* updates

* updates

* Update atmos.yaml

Co-authored-by: Erik Osterman (CEO @ Cloud Posse) <[email protected]>

* updates

---------

Co-authored-by: Erik Osterman (CEO @ Cloud Posse) <[email protected]>
  • Loading branch information
aknysh and osterman authored Jan 10, 2025
1 parent b13a2fd commit 43a3ec8
Show file tree
Hide file tree
Showing 14 changed files with 883 additions and 103 deletions.
12 changes: 7 additions & 5 deletions atmos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -272,19 +272,21 @@ schemas:
opa:
# Can also be set using 'ATMOS_SCHEMAS_OPA_BASE_PATH' ENV var, or '--schemas-opa-dir' command-line argument
# Supports both absolute and relative paths
# If not specified in `atmos.yaml` in `schemas.atmos.manifest`, an embedded schema will be used
base_path: "stacks/schemas/opa"
# JSON Schema to validate Atmos manifests
# https://atmos.tools/cli/schemas/
# https://atmos.tools/cli/commands/validate/stacks/
# https://atmos.tools/quick-start/advanced/configure-validation/
# https://atmos.tools/schemas/atmos/atmos-manifest/1.0/atmos-manifest.json
# https://json-schema.org/draft/2020-12/release-notes
# https://www.schemastore.org/json
# https://github.com/SchemaStore/schemastore
atmos:
# Can also be set using 'ATMOS_SCHEMAS_ATMOS_MANIFEST' ENV var, or '--schemas-atmos-manifest' command-line argument
# Supports both absolute and relative paths (relative to the `base_path` setting in `atmos.yaml`)
manifest: "stacks/schemas/atmos/atmos-manifest/1.0/atmos-manifest.json"
# atmos:
# Can also be set using 'ATMOS_SCHEMAS_ATMOS_MANIFEST' ENV var, or '--schemas-atmos-manifest' command-line argument
# Supports both absolute and relative paths (relative to the `base_path` setting in `atmos.yaml`)
# Supports URLs like https://atmos.tools/schemas/atmos/atmos-manifest/1.0/atmos-manifest.json
# manifest: "stacks/schemas/atmos/atmos-manifest/1.0/atmos-manifest.json"
# manifest: "https://atmos.tools/schemas/atmos/atmos-manifest/1.0/atmos-manifest.json"

# `Go` templates in Atmos manifests
# https://atmos.tools/core-concepts/stacks/templates
Expand Down
2 changes: 1 addition & 1 deletion examples/quick-start-advanced/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ARG GEODESIC_OS=debian
# https://atmos.tools/
# https://github.com/cloudposse/atmos
# https://github.com/cloudposse/atmos/releases
ARG ATMOS_VERSION=1.141.0
ARG ATMOS_VERSION=1.144.0

# Terraform: https://github.com/hashicorp/terraform/releases
ARG TF_VERSION=1.5.7
Expand Down
11 changes: 6 additions & 5 deletions examples/quick-start-advanced/atmos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -193,14 +193,15 @@ schemas:
# https://atmos.tools/cli/schemas/
# https://atmos.tools/cli/commands/validate/stacks/
# https://atmos.tools/quick-start/advanced/configure-validation/
# https://atmos.tools/schemas/atmos/atmos-manifest/1.0/atmos-manifest.json
# https://json-schema.org/draft/2020-12/release-notes
# https://www.schemastore.org/json
# https://github.com/SchemaStore/schemastore
atmos:
# Can also be set using 'ATMOS_SCHEMAS_ATMOS_MANIFEST' ENV var, or '--schemas-atmos-manifest' command-line argument
# Supports both absolute and relative paths (relative to the `base_path` setting in `atmos.yaml`)
manifest: "stacks/schemas/atmos/atmos-manifest/1.0/atmos-manifest.json"
# atmos:
# Can also be set using 'ATMOS_SCHEMAS_ATMOS_MANIFEST' ENV var, or '--schemas-atmos-manifest' command-line argument
# Supports both absolute and relative paths (relative to the `base_path` setting in `atmos.yaml`)
# Supports URLs like https://atmos.tools/schemas/atmos/atmos-manifest/1.0/atmos-manifest.json
# manifest: "stacks/schemas/atmos/atmos-manifest/1.0/atmos-manifest.json"
# manifest: "https://atmos.tools/schemas/atmos/atmos-manifest/1.0/atmos-manifest.json"

# `Go` templates in Atmos manifests
# https://atmos.tools/core-concepts/stacks/templates
Expand Down
28 changes: 14 additions & 14 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ require (
github.com/Masterminds/sprig/v3 v3.3.0
github.com/alecthomas/chroma v0.10.0
github.com/arsham/figurine v1.3.0
github.com/aws/aws-sdk-go-v2 v1.32.7
github.com/aws/aws-sdk-go-v2/config v1.28.8
github.com/aws/aws-sdk-go-v2/service/ssm v1.56.3
github.com/aws/aws-sdk-go-v2 v1.32.8
github.com/aws/aws-sdk-go-v2/config v1.28.9
github.com/aws/aws-sdk-go-v2/service/ssm v1.56.4
github.com/bmatcuk/doublestar/v4 v4.7.1
github.com/charmbracelet/bubbles v0.20.0
github.com/charmbracelet/bubbletea v1.2.4
Expand All @@ -25,7 +25,7 @@ require (
github.com/google/go-github/v59 v59.0.0
github.com/google/uuid v1.6.0
github.com/hairyhenderson/gomplate/v3 v3.11.8
github.com/hashicorp/go-getter v1.7.6
github.com/hashicorp/go-getter v1.7.7
github.com/hashicorp/hcl v1.0.0
github.com/hashicorp/hcl/v2 v2.23.0
github.com/hashicorp/terraform-config-inspect v0.0.0-20241129133400-c404f8227ea6
Expand Down Expand Up @@ -83,21 +83,21 @@ require (
github.com/atotto/clipboard v0.1.4 // indirect
github.com/aws/aws-sdk-go v1.44.206 // indirect
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.1 // indirect
github.com/aws/aws-sdk-go-v2/credentials v1.17.49 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.22 // indirect
github.com/aws/aws-sdk-go-v2/credentials v1.17.50 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.23 // indirect
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.14 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.26 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.26 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.27 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.27 // indirect
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1 // indirect
github.com/aws/aws-sdk-go-v2/internal/v4a v1.0.2 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.1 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.6 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.7 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.8 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.13.5 // indirect
github.com/aws/aws-sdk-go-v2/service/s3 v1.26.10 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.24.8 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.7 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.33.4 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.24.9 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.8 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.33.5 // indirect
github.com/aws/smithy-go v1.22.1 // indirect
github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect
github.com/aymerick/douceur v0.2.0 // indirect
Expand Down Expand Up @@ -260,10 +260,10 @@ require (
go4.org/intern v0.0.0-20230205224052-192e9f60865c // indirect
go4.org/unsafe/assume-no-moving-gc v0.0.0-20230525183740-e7c30c78aeb2 // indirect
gocloud.dev v0.25.1-0.20220408200107-09b10f7359f7 // indirect
golang.org/x/crypto v0.31.0 // indirect
golang.org/x/crypto v0.32.0 // indirect
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect
golang.org/x/mod v0.19.0 // indirect
golang.org/x/net v0.33.0 // indirect
golang.org/x/net v0.34.0 // indirect
golang.org/x/oauth2 v0.24.0 // indirect
golang.org/x/sync v0.10.0 // indirect
golang.org/x/sys v0.29.0 // indirect
Expand Down
Loading

0 comments on commit 43a3ec8

Please sign in to comment.