Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document All Atmos Schemas #966

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 17 additions & 15 deletions website/docs/cli/configuration/configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import Screengrab from '@site/src/components/Screengrab'
import Terminal from '@site/src/components/Terminal'
import File from '@site/src/components/File'
import Intro from '@site/src/components/Intro'
import Admonition from '@theme/Admonition'

# CLI Configuration

Expand Down Expand Up @@ -182,7 +183,7 @@ The `settings` section configures Atmos global settings.
<dd>The items in the destination list are deep-merged with the items in the source list. The items in the source list take precedence. The items are processed starting from the first up to the length of the source list (the remaining items are not processed). If the source and destination lists have the same length, all items in the destination lists are deep-merged with all items in the source list.</dd>
</dl>
</dd>

<dt>`settings.terminal`</dt>
<dd>
Specifies how content is displayed in the terminal.
Expand All @@ -204,9 +205,10 @@ The `settings` section configures Atmos global settings.

<dt>`settings.docs` (Deprecated)</dt>
<dd>
:::warning Deprecated
The `settings.docs` section is deprecated and will be removed in a future version. Please use `settings.terminal` instead.
:::

<Admonition type="warning" title="Deprecated">
The `settings.docs` section is deprecated and will be removed in a future version. Please use `settings.terminal` instead.
</Admonition>

<dl>
<dt>`max-width` (Deprecated)</dt>
Expand Down Expand Up @@ -648,7 +650,7 @@ Most YAML settings can also be defined by environment variables. This is helpful
setting `ATMOS_STACKS_BASE_PATH` to a path in `/localhost` to your local development folder, will enable you to rapidly iterate.

| Variable | YAML Path | Description |
|:------------------------------------------------------|:------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| :---------------------------------------------------- | :---------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ATMOS_CLI_CONFIG_PATH | N/A | Where to find `atmos.yaml`. Path to a folder where `atmos.yaml` CLI config file is located (e.g. `/config`) |
| ATMOS_BASE_PATH | base_path | Base path to `components` and `stacks` folders |
| ATMOS_VENDOR_BASE_PATH | vendor.base_path | Path to vendor configuration file or directory containing vendor files. If a directory is specified, all .yaml files in the directory will be processed in lexicographical order. Supports both absolute and relative paths. |
Expand Down Expand Up @@ -683,16 +685,16 @@ setting `ATMOS_STACKS_BASE_PATH` to a path in `/localhost` to your local develop

Some commands, like [`atmos terraform shell`](/cli/commands/terraform/shell),
spawn an interactive shell with certain environment variables set, in order to enable the user to use other tools
(in the case of `atmos terraform shell`, the Terraform or Tofu CLI) natively, while still being configured for a
specific component and stack. To accomplish this, and to provide visibility and context to the user regarding the
(in the case of `atmos terraform shell`, the Terraform or Tofu CLI) natively, while still being configured for a
specific component and stack. To accomplish this, and to provide visibility and context to the user regarding the
configuration, Atmos may set the following environment variables in the spawned shell:

| Variable | Description |
|:------------------------|:-------------------------------------------------------------------------------------------------------|
| ATMOS_COMPONENT | The name of the active component |
| ATMOS_SHELL_WORKING_DIR | The directory from which native commands should be run |
| ATMOS_SHLVL | The depth of Atmos shell nesting. When present, it indicates that the shell has been spawned by Atmos. |
| ATMOS_STACK | The name of the active stack |
| Variable | Description |
| :------------------------ | :----------------------------------------------------------------------------------------------------- |
| ATMOS_COMPONENT | The name of the active component |
| ATMOS_SHELL_WORKING_DIR | The directory from which native commands should be run |
| ATMOS_SHLVL | The depth of Atmos shell nesting. When present, it indicates that the shell has been spawned by Atmos. |
| ATMOS_STACK | The name of the active stack |
| ATMOS_TERRAFORM_WORKSPACE | The name of the Terraform workspace in which Terraform comamnds should be run |
| PS1 | When a custom shell prompt has been configured in Atmos, the prompt will be set via `PS1` |
| TF_CLI_ARGS_* | Terraform CLI arguments to be passed to Terraform commands |
| PS1 | When a custom shell prompt has been configured in Atmos, the prompt will be set via `PS1` |
| TF_CLI_ARGS_* | Terraform CLI arguments to be passed to Terraform commands |
10 changes: 10 additions & 0 deletions website/docs/schemas/cli.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
title: Atmos Configuration Schema
sidebar_position: 1
sidebar_label: CLI Configuration
description: Atmos CLI Configuration Schema
---
import Schema from '@site/static/schemas/atmos/1.0/cli.json'
import JSONSchemaViewer from "@theme/JSONSchemaViewer";

<JSONSchemaViewer schema={ Schema } />
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ title: Atmos Manifest JSON Schema
description: Atmos Schemas
sidebar_label: Schemas
sidebar_position: 5
sidebar_class_name: hidden
slug: /cli/schemas
---
import Terminal from '@site/src/components/Terminal'
import Intro from '@site/src/components/Intro'
Expand Down
10 changes: 10 additions & 0 deletions website/docs/schemas/stack.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
title: Stack Schema
sidebar_position: 1
sidebar_label: Stacks
description: Stack Schema
---
import Schema from '@site/static/schemas/atmos/1.0/stack.json'
import JSONSchemaViewer from "@theme/JSONSchemaViewer";

<JSONSchemaViewer schema={ Schema } />
10 changes: 10 additions & 0 deletions website/docs/schemas/vendor.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
title: Vendor Schema
sidebar_position: 1
sidebar_label: Vendor
description: Vendor Schema
---
import Schema from '@site/static/schemas/atmos/1.0/vendor.json'
import JSONSchemaViewer from "@theme/JSONSchemaViewer";

<JSONSchemaViewer schema={ Schema } />
10 changes: 10 additions & 0 deletions website/docs/schemas/workflow.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
title: Workflow Schema
sidebar_position: 1
sidebar_label: Workflows
description: Workflow Schema
---
import Schema from '@site/static/schemas/atmos/1.0/vendor.json'
import JSONSchemaViewer from "@theme/JSONSchemaViewer";

<JSONSchemaViewer schema={ Schema } />
2 changes: 1 addition & 1 deletion website/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ const config = {
mermaid: true,
},

themes: ['@docusaurus/theme-mermaid']
themes: ['@docusaurus/theme-mermaid', 'docusaurus-json-schema-plugin']
};

module.exports = config;
159 changes: 159 additions & 0 deletions website/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"@mdx-js/react": "^3.1.0",
"clsx": "^2.1.1",
"custom-loaders": "file:plugins/custom-loaders",
"docusaurus-json-schema-plugin": "^1.12.2",
"docusaurus-plugin-image-zoom": "^2.0.0",
"docusaurus-plugin-sentry": "^2.0.0",
"html-loader": "^5.1.0",
Expand Down
13 changes: 13 additions & 0 deletions website/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,19 @@ module.exports = {
type: 'autogenerated',
dirName: 'cli',
},
{
type: 'category',
label: 'Schemas',
collapsible: true,
collapsed: true,
link: {type: 'doc', id: 'schemas/schemas'},
items: [
{
type: 'autogenerated',
dirName: 'schemas',
},
]
}
]
},

Expand Down
Loading