what
- Remove the default hardcoded CLI config
- Update TF workspace calculation for Spacelift stacks
why
- Make
atmos.yaml
CLI config always required. Remove the default hardcoded CLI config b/c it had some default values which are not applicable for all use cases. Instead, throw error ifatmos.yaml
is not found
export ATMOS_LOGS_VERBOSE=true
atmos describe component test/test-component-override -s tenant1-ue2-dev
Found ENV var ATMOS_LOGS_VERBOSE=true
Searching, processing and merging atmos CLI configurations (atmos.yaml) in the following order:
system dir, home dir, current dir, ENV vars, command-line arguments
No config file atmos.yaml found in path '/usr/local/etc/atmos/atmos.yaml'.
No config file atmos.yaml found in path '/Users/xxxxx/.atmos/atmos.yaml'.
No config file atmos.yaml found in path '/Go/src/github.com/cloudposse/atmos/atmos.yaml'.
'atmos.yaml' CLI config files not found in any of the searched paths: system dir, home dir, current dir, ENV vars.
You can download a sample config and adapt it to your requirements from https://raw.githubusercontent.com/cloudposse/atmos/master/examples/complete/atmos.yaml
-
Add a separate function to process component metadata section to make the code more DRY, and use it to calculate the TF workspaces for
atmos
commands and for Spacelift stacks -
Fix TF workspace calculation for Spacelift stacks for rare cases when the atmos component name in YAML config is the same as its Terraform component name (specified in
component
ormetadata.component
attributes). This fixes TF workspaces for Spacelift stacks for atmos components like the following
components:
terraform:
glue/iam:
metadata:
component: glue/iam # Terraform component (this is not necessary to specify since the TF component, if not specified, will be assumed to be the same as the atmos YAML component)