Skip to content

Releases: cloudposse/atmos

v1.107.0

16 Nov 21:00
f909493
Compare
Choose a tag to compare
Add support for custom `atmos terraform shell` prompt @pkbhowmick (#786)

what

  • Add support for custom atmos terraform shell prompt
  • Allow specifying custom prompt for atmos terraform shell command in atmos.yaml. Supports Go templates

why

  • Improve user experience
  • Make the prompt customizable

Working demo

With custom prompt:

Screenshot 2024-11-16 at 11 20 14 PM

Without custom prompt:

image

v1.106.1

15 Nov 19:25
81f6db2
Compare
Choose a tag to compare
Update gettings started, add $schema directive at the top of files @osterman (#769)

what

  • Remove unimplemented commands
  • $schema directive at the top of files

why

  • Not everyone will have $schema validation enabled by default in their editor
Enhance `WriteToFileAsJSON` with pretty-printing support @RoseSecurity (#783)

what

  • Used the ConvertToJSON utility with json.MarshalIndent to produce formatted JSON
  • Indentation is set to two spaces (" ") for consistent readability

why

  • This PR improves the WriteToFileAsJSON function by introducing pretty-printing for JSON outputs. Previously, the function serialized JSON using a compact format, which could make the resulting files harder to read. With this change, all JSON written by this function will now be formatted with indentation, making it easier for developers and users to inspect and debug the generated files

  • This specifically addresses #778 , which previously rendered auto-generated backends as:

{
   "terraform": {
   "backend": {
   "s3": {
   "acl": "bucket-owner-full-control",
   "bucket": "my-tfstate-bucket",
   "dynamodb_table": "some-dynamo-table",
   "encrypt": true,
   "key": "terraform.tfstate",
   "profile": "main",
   "region": "us-west-2",
   "workspace_key_prefix": "something"
}
}
}
}

With this addition, the output appears as:

{
  "terraform": {
    "backend": {
      "s3": {
        "acl": "bucket-owner-full-control",
        "bucket": "my-tfstate-bucket",
        "dynamodb_table": "some-dynamo-table",
        "encrypt": true,
        "key": "terraform.tfstate",
        "profile": "main",
        "region": "us-west-2",
        "workspace_key_prefix": "something"
      }
    }
  }
}

references

v1.106.0

13 Nov 20:56
9acca77
Compare
Choose a tag to compare
Add support for vendor path setting in `atmos.yaml` @Cerebrovinny (#737)

what

  • Add support for vendor path setting in atmos.yaml
  • Add support for vendor files under folders or multiple vendor files to be processed in lexicographic order

why

  • Users now should be able to use new variable vendor in atmos.yaml and process different vendor files at different locations

v1.105.0

12 Nov 13:46
74516e6
Compare
Choose a tag to compare
Clean Terraform workspace before executing `terraform init` in the `atmos.Component` template function @aknysh (#775)

what

  • Clean Terraform workspace before executing terraform init in the atmos.Component template function

why

When using multiple backends for the same component (e.g. separate backends per tenant or account), and if an Atmos command was executed that selected a Terraform workspace, Terraform will prompt the user to select one of the following workspaces:

 1. default
 2. <the previously used workspace>

The prompt forces the user to always make a selection (which is error-prone), and also makes it complicated when running on CI/CD.

This PR adds the logic that deletes the .terraform/environment file from the component directory before executing terraform init when executing the atmos.Component template function. It allows executing the atmos.Component function for a component in different Terraform workspaces without Terraform asking to select a workspace. The .terraform/environment file contains the name of the currently selected workspace, helping Terraform identify the active workspace context for managing your infrastructure.

v1.104.0

11 Nov 17:51
d502eb0
Compare
Choose a tag to compare
Change PS1 to show that Atmos is in the `atmos terraform shell` mode @pkbhowmick (#761)

what

  • Change PS1 to show that Atmos is in the atmos terraform shell mode
  • Customized command prompt for the interactive shell with the addition of the "atmos>" prefix
  • Enhanced shell behavior by removing the unnecessary -l flag for non-Windows systems and implementing a fallback to sh if bash is unavailable.
  • Improved handling for the /bin/zsh shell with additional flags

why

  • Improve user experience

test

image

v1.103.0

11 Nov 17:25
1250929
Compare
Choose a tag to compare
feat: additional `atmos docs` parameters for specifying width, using auto-styling and color profile, and preserving new lines @RoseSecurity (#757)

what

atmos_docs

  • Add an additional atmos docs flag for specifying the width of markdown output
  • Utilizing auto-styling based on light or dark mode preferences instead of hardcoding to dark
  • Preserving new lines with rendered markdown

why

  • Enhance the user experience for interacting with documentation. The width parameter is useful for users who prefer seeing wider output for Terraform docs-generated tables and is defined in the atmos.yaml:
settings:
  docs:
    max-width: 200

references

v1.102.0

10 Nov 20:23
ffb64eb
Compare
Choose a tag to compare
Wrapper for long lines in help @Cerebrovinny (#770)

what

  • Implemented a new terminal-aware text wrapping system for CLI help output
  • Added responsive width handling based on terminal size with fallback values
  • Introduced custom usage template handling for consistent help text formatting
  • Created dedicated terminal writer component for automatic text wrapping

why

  • Improves readability of CLI help text by ensuring content fits within terminal width
  • Provides better user experience with dynamic text wrapping based on terminal size
  • Standardizes help text formatting across all commands
  • Fixes potential issues with text overflow in narrow terminal windows

references

Before:
Screenshot 2024-11-09 at 16 15 26
Screenshot 2024-11-09 at 16 31 54

After:
Screenshot 2024-11-09 at 18 19 56

v1.101.0

08 Nov 14:06
3342e8e
Compare
Choose a tag to compare
Skip component if `metadata.enabled` is set to `false` @pkbhowmick (#756)

what

  • Skip component if metadata.enabled is set to false
  • Added documentation on using the metadata.enabled parameter to conditionally exclude components in deployment

why

  • Allow disabling Atmos components from being processed and provisioned by setting metadata.enabled to false in the stack manifest w/o affecting/changing/disabling the Terraform components (e.g. w/o setting the enabled variable to false)

demo

image

v1.100.1

07 Nov 20:52
4617630
Compare
Choose a tag to compare
Add .coderabbit.yaml for CodeRabbit integration configuration settings @osterman (#758)

what

  • Add coderrabit config
  • Tune the prompt
  • Enable linear integration

why

  • Want to work towards a config that is less noisy (although this is probably not the PR that solves that)

🚀 Enhancements

handle invalid command error @pkbhowmick (#766)

what

  • Improved error handling for command arguments, providing clearer feedback when invalid commands are used
  • Enhanced logging to include a list of available commands when an error occurs due to invalid arguments.

why

  • Better user experience

working example

Before:

Screenshot 2024-11-08 at 1 56 30 AM

After fix:

Screenshot 2024-11-08 at 1 57 12 AM

v1.100.0

02 Nov 22:28
d25bb50
Compare
Choose a tag to compare
Improve `terraform` and `helmfile` help. Enable `Go` templating in the `command` field. Clean Terraform workspace before executing `terraform init` @aknysh (#759)

what

  • Improve terraform and helmfile help
  • Enable Go templating in the command field of stack config
  • Clean Terraform workspace before executing terraform init

why

  • Improve the help messages. When a user executes atmos terraform --help or atmos helmfile --help (or help for a subcommand), print a message describing the command and how to execute the terraform and helmfile help command

     atmos terraform --help

image


  • Enable Go templating in the command stack config in addition to the already supported sections.

    You can now use Go templates in the following Atmos sections to refer to values in the same or other sections:

    • vars
    • settings
    • env
    • providers
    • overrides
    • backend
    • backend_type
    • component
    • metadata.component
    • command

    Enabling Go templates in the command section allows specifying different Terraform/OpenTofu/Helmfile versions per component/stack, and get the value from different Atmos sections or from external data sources

  • Clean Terraform workspace before executing terraform init. When using multiple backends for the same component (e.g. separate backends per tenant or account), and if an Atmos command was executed that selected a Terraform workspace, Terraform will prompt the user to select one of the following workspaces:

     1. default
     2. <the previously used workspace>

    The prompt forces the user to always make a selection (which is error-prone), and also makes it complicated when running on CI/CD.

    The PR adds the logic that deletes the .terraform/environment file from the component directory before executing terraform init. The .terraform/environment file contains the name of the currently selected workspace, helping Terraform identify the active workspace context for managing your infrastructure. We delete the file before executing terraform init to prevent the Terraform prompt asking to select the default or the previously used workspace.