github cloudposse/atmos v1.173.0

latest releases: v1.202.0-rc.4, v1.202.0-rc.3, v1.202.0-rc.2...
7 months ago
Update `atmos.Component` template function for `helmfile` components @aknysh (#1217)

what

  • Update atmos.Component template function for helmfile components
  • Add tests
  • Update docs

why

  • atmos.Component template function allows reading any section or attribute from the component (vars, settings, etc.), including the outputs section (Terraform state). Helmfile components don't have Terraform state. This PR adds detecting the component type (terraform or helmfile) when executing atmos.Component, and don't try to read the remote state for the helmfile components
components:
  # Terraform components
  terraform:
    component-1:
      vars:
        foo: "foo"
        bar: "bar"
        baz: "baz

    component-2:
      vars:
        foo: '{{ (atmos.Component "component-1" .stack).outputs.foo }}'
        bar: '{{ (atmos.Component "component-1" .stack).outputs.bar }}'
        baz: '{{ (atmos.Component "component-1" .stack).outputs.bar }}--{{ (atmos.Component "component-1" .stack).outputs.baz }}'

  # Helmfile components
  helmfile:
    component-3:
      vars:
        foo: '{{ (atmos.Component "component-1" .stack).vars.foo }}'
        bar: '{{ (atmos.Component "component-1" .stack).vars.bar }}'
        baz: '{{ (atmos.Component "component-1" .stack).vars.baz }}'

    component-4:
      vars:
        foo: '{{ (atmos.Component "component-1" .stack).outputs.foo }}'
        bar: '{{ (atmos.Component "component-3" .stack).vars.bar }}'
        # Helmfile components don't have `outputs` (terraform output) - this should result in `<no value>` and not throwing errors
        baz: '{{ (atmos.Component "component-3" .stack).outputs.baz }}'
Refactor YAML Function Processing in `atmos.yaml`, Support `!env`, `!exec`,`!include`,!`repo-root` functions in `atmos.yaml` configuration files @haitham911 (#1202)

what

  • Refactor YAML Function Processing in atmos.yaml
  • Support !env, !exec,!include,!repo-root functions in atmos.yaml configuration files

why

  • Added support for !exec directive in configuration files enables dynamic configuration like GITHUB_TOKEN: !exec <gh auth token>
  • Added support for !env directive in configuration files enables dynamic configuration
  • Added support for !include directive in configuration files enables dynamic configuration in atmos.yaml
  • Added support for !repo-root to retrieve the root directory of the Atmos repository. If the Git root is not found, it will return a default value if specified
Component Updater Docs @milldr (#1211)

what

  • Use Steps and StepNumber conventions for component updater documentation

why

  • This documentation was difficult to follow. Using these conventions makes it easier to follow
Replace `myapp` with `mock` component in tests @milldr (#1213)

what

  • Delete all occurrences of myapp component
  • Replaced with mock component

why

  • The myapp component was built with weather API. We were abusing this API for our tests, which isn't even necessary for what we want to test. The simple mock with inputs and outputs is sufficient.

Don't miss a new atmos release

NewReleases is sending notifications on new releases.