github cloudposse/atmos v1.77.0

latest releases: v1.83.1, v1, v1.83.0...
one month ago
Update `atmos validate stacks` command @aknysh (#611)

what

  • Update atmos validate stacks command
  • Improve stack validation error messages

why

  • When checking for misconfiguration and duplication of components in stacks, throw errors only if the duplicate component configurations in the same stack are different (this will allow importing the base default/abstract components into many stack manifest files)

  • The atmos validate stacks command check the following

    • All YAML manifest files for YAML errors and inconsistencies

    • All imports: if they are configured correctly, have valid data types, and point to existing manifest files

    • Schema: if all sections in all YAML manifest files are correctly configured and have valid data types

    • Misconfiguration and duplication of components in stacks. If the same Atmos component in the same Atmos stack is defined in more than one stack manifest file, and the component configurations are different, an error message will be displayed similar to the following:

      The Atmos component 'vpc' in the stack 'plat-ue2-dev' is defined in more than one
      top-level stack manifest file: orgs/acme/plat/dev/us-east-2-extras, orgs/acme/plat/dev/us-east-2.
      
      The component configurations in the stack manifests are different.
      
      To check and compare the component configurations in the stack manifests, run the following commands:
      - atmos describe component vpc -s orgs/acme/plat/dev/us-east-2-extras
      - atmos describe component vpc -s orgs/acme/plat/dev/us-east-2
      
      You can use the '--file' flag to write the results of the above commands to files
      (refer to https://atmos.tools/cli/commands/describe/component).
      
      You can then use the Linux 'diff' command to compare the files line by line and show the differences
      (refer to https://man7.org/linux/man-pages/man1/diff.1.html)
      
      When searching for the component 'vpc' in the stack 'plat-ue2-dev', Atmos can't decide which
      stack manifest file to use to get configuration for the component. This is a stack misconfiguration.
      
      Consider the following solutions to fix the issue:
      
        - Ensure that the same instance of the Atmos 'vpc' component in the stack 'plat-ue2-dev'
          is only defined once (in one YAML stack manifest file)
        
        - When defining multiple instances of the same component in the stack,
          ensure each has a unique name
        
        - Use multiple-inheritance to combine multiple configurations together
          (refer to https://atmos.tools/core-concepts/components/inheritance)   

notes

  • This is an improvement of the previous release https://github.com/cloudposse/atmos/releases/tag/v1.75.0. The previous release introduced too strict checking and disabled the case where the same component in the same stack was just imported into two or more stack manifest files (this type of configuration is acceptable since the component config is always the same in the stack manifests since it's just imported and not modified)

Don't miss a new atmos release

NewReleases is sending notifications on new releases.