atmos describe component
Use this command to describe the complete configuration for an Atmos component in an Atmos stack.
Usage​
Execute the atmos describe component
command like this:
atmos describe component <component> -s <stack>
Run atmos describe component --help
to see all the available options
Examples​
atmos describe component infra/vpc -s tenant1-ue2-dev
atmos describe component infra/vpc -s tenant1-ue2-dev --format json
atmos describe component infra/vpc -s tenant1-ue2-dev -f yaml
atmos describe component infra/vpc -s tenant1-ue2-dev --file component.yaml
atmos describe component echo-server -s tenant1-ue2-staging
atmos describe component test/test-component-override -s tenant2-ue2-prod
atmos describe component vpc -s tenant1-ue2-dev --process-templates=false
atmos describe component vpc -s tenant1-ue2-dev --process-functions=false
atmos describe component vpc -s tenant1-ue2-dev --skip=terraform.output
atmos describe component vpc -s tenant1-ue2-dev --skip=terraform.output --skip=include
atmos describe component vpc -s tenant1-ue2-dev --skip=include,eval
atmos describe component vpc -s plat-ue2-prod --query .vars.tags
atmos describe component vpc -s plat-ue2-prod -q .settings
atmos describe component vpc -s plat-ue2-prod --pager=more
Arguments​
Argument | Description | Required |
---|---|---|
component | Atmos component | yes |
Flags​
Flag | Description | Alias | Required |
---|---|---|---|
--stack | Atmos stack | -s | yes |
--format | Output format: yaml or json (yaml is default) | -f | no |
--file | If specified, write the result to the file | no | |
--process-templates | Enable/disable processing of all Go templatesin Atmos stacks manifests when executing the command. Use the flag to see the component configuration before and after the templates are processed. If the flag is not provided, it's set to true by default.atmos describe component <c> -s <stack> --process-templates=false | no | |
--process-functions | Enable/disable processing of all Atmos YAML functions in Atmos stacks manifests when executing the command. Use the flag to see the component configuration before and after the functions are processed. If the flag is not provided, it's set to true by default.atmos describe component <c> -s <stack> --process-functions=false | no | |
--skip | Skip processing a specific Atmos YAML function in Atmos stacks manifests when executing the command. To specify more than one function, use multiple --skip flags, or separate the functions with a comma:atmos describe component <c> -s <stack> --skip=terraform.output --skip=include atmos describe component <c> -s <stack> --skip=terraform.output,include | no | |
--query | Query the results of the command using yq expressions.atmos describe component <c> -s <stack> --query .vars.tags For more details, refer to https://mikefarah.gitbook.io/yq | -q | no |
--pager | Disable/Enable the paging user experience |
Output​
The command outputs the final deep-merged component configuration.
The output contains the following sections:
-
atlantis_project
- Atlantis project name (if Atlantis Integration is configured for the component in the stack) -
atmos_cli_config
- information about Atmos CLI configuration fromatmos.yaml
-
atmos_component
- Atmos component name -
atmos_stack
- Atmos stack name -
stack
- same asatmos_stack
-
atmos_stack_file
- the stack manifest where the Atmos stack is defined -
atmos_manifest
- same asatmos_stack_file
-
backend
- Terraform/OpenTofu backend configuration -
backend_type
- Terraform/OpenTofu backend type -
command
- the binary to execute when provisioning the component (e.g.terraform
,terraform-1
,tofu
,helmfile
) -
component
- the Terraform/OpenTofu component for which the Atmos component provides configuration -
component_type
- the type of the component (terraform
orhelmfile
) -
component_info
- a block describing the Terraform or Helmfile components that the Atmos component manages. Thecomponent_info
block has the following sections:-
component_path
- the filesystem path to the Terraform/OpenTofu or Helmfile component -
component_type
- the type of the component (terraform
orhelmfile
) -
terraform_config
- if the component type isterraform
, this sections describes the high-level metadata about the Terraform component from its source code, including variables, outputs and child Terraform modules (using a Terraform parser from HashiCorp). The file names and line numbers where the variables, outputs and child modules are defined are also included. Invalid Terraform configurations are also detected, and in case of any issues, the warnings and errors are shows in theterraform_config.diagnostics
section
-
-
env
- a map of ENV variables defined for the Atmos component -
inheritance
- component's inheritance chain -
metadata
- component's metadata config -
remote_state_backend
- Terraform/OpenTofu backend config for remote state -
remote_state_backend_type
- Terraform/OpenTofu backend type for remote state -
settings
- component settings (free-form map) -
sources
- sources of the values from the component's sections (vars
,env
,settings
) -
spacelift_stack
- Spacelift stack name (if Spacelift Integration is configured for the component in the stack andsettings.spacelift.workspace_enabled
is set totrue
) -
vars
- the final deep-merged component variables that are provided to Terraform/OpenTofu and Helmfile when executingatmos terraform
andatmos helmfile
commands -
workspace
- Terraform/OpenTofu workspace for the Atmos component -
imports
- a list of all imports in the Atmos stack (this shows all imports in the stack, related to the component and not) -
deps_all
- a list of all component stack dependencies (stack manifests where the component settings are defined, either inline or via imports) -
deps
- a list of component stack dependencies where the final values of all component configurations are defined (after the deep-merging and processing all the inheritance chains and all the base components) -
overrides
- a map of overrides for the component. Refer to Component Overrides for more details -
providers
- a map of provider configurations for the component
Difference between imports
, deps_all
and deps
outputs​
The difference between the imports
, deps_all
and deps
outputs is as follows:
-
imports
shows all imports in the stack for all components. This can be useful in GitHub actions and in OPA validation policies to check whether an import is allowed in the stack or not -
deps_all
shows all component stack dependencies (imports and root-level stacks) where any configuration for the component is present. This also can be useful in GitHub Actions and OPA validation policies to check whether a user or a team is allowed to import a particular config file for the component in the stack -
deps
shows all the component stack dependencies where the FINAL values from all the component sections are defined (after the deep-merging and processing all the inheritance chains and all the base components). This is useful in CI/CD systems (e.g. Spacelift) to detect only the affected files that the component depends on.deps
is usually a much smaller list thandeps_all
and can differ from it in the following ways:-
An Atmos component can inherit configurations from many base components, see Component Inheritance, and import those base component configurations
-
The component can override all the default variables from the base components, and the final values are not dependent on the base component configs anymore. For example,
derived-component-3
import the base componentbase-component-4
, inherits from it, and overrides all the variables:
# Import the base component config
import:
- catalog/terraform/base-component-4
components:
terraform:
derived-component-3:
metadata:
component: "test/test-component" # Point to the Terraform/OpenTofu component
inherits:
# Inherit all the values from the base component
- base-component-4
vars:
# Override all the variables from the base component-
Atmos detects that and does not include the base component
base-component-4
config file into thedeps
output since thederived-component-3
does not directly depend onbase-component-4
(all values are coming from thederived-component-3
). This will help, for example, prevent unrelated Spacelift stack triggering -
In the above case, the
deps_all
output will include bothderived-component-3
andbase-component-4
, but thedeps
output will not includebase-component-4
-