github cloudposse/atmos v1.175.0

latest releases: v1.190.0-test.0, v1.190.0-rc.0, v1.189.0...
3 months ago
Fix `atmos terraform shell` command. Improve `!terraform.output` YAML function @aknysh (#1252)

what

why

  • In atmos terraform shell command, parsing and adding the system (parent process) environment variables to the launched shell was accidentally removed in a previous PR. Added it back

  • Allow specifying a default value in the !terraform.output YAML function

Using YQ Expressions to provide a default value

If the component for which you are reading the output has not been provisioned yet, the !terraform.output function
will return the string <no value> unless you specify a default value in the YQ expression, in which case the function will return the default value.

This will allow you to mock outputs when executing atmos terraform plan where there are dependencies between components, and the dependent components are not provisioned yet.

NOTE: To provide a default value, you use the // YQ operator. The whole YQ expression contains spaces, and to make it a single parameter, you need to double-quote it. YQ requires the strings in the default values to be double-quoted as well.
This means that you have to escape the double-quotes in the default values by using two double-quotes.

For example:

  • Specify a string default value.
    Read the username output from the config component in the current stack.
    If the config component has not been provisioned yet, return the default value default-user
username: !terraform.output config ".username // ""default-user"""
  • Specify a list default value.
    Read the private_subnet_ids output from the vpc component in the current stack.
    If the vpc component has not been provisioned yet, return the default value ["mock-subnet1", "mock-subnet2"]
subnet_ids: !terraform.output vpc ".private_subnet_ids // [""mock-subnet1"", ""mock-subnet2""]"
  • Specify a map default value.
    Read the config_map output from the config component in the current stack.
    If the config component has not been provisioned yet, return the default value {"api_endpoint": "localhost:3000", "user": "test"}
config_map: !terraform.output 'config ".config_map // {""api_endpoint"": ""localhost:3000"", ""user"": ""test""}"'

For more details, review the following docs:

Add no-color support for Atmos @samtholiya (#1227)

what

  • We are adding support for no color output for atmos

why

  • Customer having custom terminal find it difficult to look at the content. Having no color option helps customer to have a visible output
Add pager to describe config command @samtholiya (#1203)

what

  • We are adding pager from https://github.com/charmbracelet/bubbletea
  • --pager flag, ATMOS_PAGER env boolean variable added to enable/disable pager if required
  • Normal View
    image
  • Help View
    image
  • When user presses c to copy the contents
    image

why

  • Better UX
Add tests for `!terraform.output`. Improve logging and error handling @aknysh (#1235)

what

  • Add tests for !terraform.output
  • Refactor code
  • Improve logging and error handling
  • Install OpenTofu in the GitHub actions for testing Atmos OpenTofu components

why

  • Add more unit tests for the !terraform.output YAML function. Test !terraform.output for OpenTofu tofu command per component
  • Refactor code: move all shell related functions to pkg/utils/shell_utils.go
  • Replace the deprecated logging functions with github.com/charmbracelet/log
  • Use structured errors for error handling
[Stores] Add support for non-string values to GSM @ohaibbq (#1237)

what

  • Users of the Google Secret Manager store can now persist/read complex values like slices and maps

why

  • Brings the Google Secret Manager store up to parity with other store implementations
Support atmos docs generate feature natively @Listener430 (#934)

what

  • Introduce a new command to generate a README.md from one or more input sources defined at docs.generate.readme section of atmos.yaml. The command combines all local or remote YAML files specified at source and generates README.md at the working directory. In case the template contains terraform_docs key, the resultant README.md will also have a corresponding section rendered. By default terraform.format is set to markdown table, and can also be markdown, tfvars hcl, and tfvars json.
    This command also aliases to “atmos generate docs”.

Run with atmos docs generate readme , e.g.
docs_generate_readme_command_line_output

Don't miss a new atmos release

NewReleases is sending notifications on new releases.