Skip to content

Releases: cloudposse/github-action-atmos-terraform-select-components

v4.0.0

02 Dec 23:00
857a956
Compare
Choose a tag to compare
Added skip checkout input @goruha (#35) ## what * Add skip checkout input

why

  • To be consistent with the Plan and apply actions that now allow to skip checkout

references

v3.1.0

18 Sep 09:27
5456867
Compare
Choose a tag to compare
Skip AWS auth if Gitops aws configuration empty in atmos settings @goruha (#34) ## what * Skip AWS auth if Gitops aws configuration empty in atmos settings

Why

  • Allow to skip AWS auth and use an external one
  • Make the action cloud agnostic

Example

If atmos.yaml contains

integrations:
  github:
    gitops:
      opentofu-version: 1.7.3    
      terraform-version: 1.5.7
      infracost-enabled: false
      artifact-storage:
        region: us-east-2
        bucket: cptest-core-ue2-auto-gitops
        table: cptest-core-ue2-auto-gitops-plan-storage
        role: arn:aws:iam::461333128641:role/cptest-core-ue2-auto-gha-iam-gitops-gha
# here used to be
#      role:
#        plan: arn:aws:iam::582055374050:role/cptest-core-gbl-identity-planners
#        apply: arn:aws:iam::582055374050:role/cptest-core-gbl-identity-gitops
      matrix:
        sort-by: .stack_slug
        group-by: .stack_slug | split("-") | [.[0], .[2]] | join("-")

v3.0.0

12 Sep 22:50
f1ee039
Compare
Choose a tag to compare
feat: add IAM auth support (required for stack config templating as of atmos 1.86.2) @goruha (#33) ## what
  • Add IAM auth support

why

  • IAM auth is required for stack config templating as of atmos 1.86.2

references

Break compatibility

  • The action now locked on AWS, if you are using the action with another cloud provider pls use version v3

🤖 Automatic Updates

Update .github/settings.yml @osterman (#32) ## what - Update `.github/settings.yml` - Drop `.github/auto-release.yml` files

why

  • Re-apply .github/settings.yml from org level
  • Use organization level auto-release settings

references

  • DEV-1242 Add protected tags with Repository Rulesets on GitHub

v2.1.0

19 Aug 16:52
81b013c
Compare
Choose a tag to compare
Use cloudposse-github-actions/install-gh-releases @goruha (#31) ## what * Use cloudposse-github-actions/install-gh-releases

why

  • Make action self contained

v2.0.1

25 Jul 17:07
9ad18af
Compare
Choose a tag to compare
Support OpenTofu @goruha (#29) ## what * Install opentofu

why

  • Gitops support OpenTofu

references

  • DEV-2269 Update infra-live and infra-test to use opentofu

🐛 Bug Fixes

Fix Release @milldr (#30) ## what - Resolved TFLint complaints in tests - Remove release workflows that are intended for TF modules

why

  • Fix the release

references

🤖 Automatic Updates

Update release workflow to allow pull-requests: write @osterman (#28) ## what - Update workflow (`.github/workflows/release.yaml`) to have permission to comment on PR

why

  • Add comment to PR when it is released
Use GitHub Action Workflows from `cloudposse/.github` Repo @osterman (#27) ## what - Update workflows (`.github/workflows/settings.yaml`) to use shared workflows from `.github` repo

why

  • Reduce nested levels of reusable workflows
Use GitHub Action Workflows from `cloudposse/.github` Repo @osterman (#25) ## what - Update workflows (`.github/workflows/settings.yaml`)

why

  • Support new readme generation workflow.
  • Generate banners

v2.0.0

11 Mar 18:01
3dc818b
Compare
Choose a tag to compare
Move `atmos-gitops-config.yaml` to `atmos.yaml` @goruha (#20)

what

  • Move atmos-gitops-config.yaml to atmos.yaml

why

  • Reduce configs files

references

  • https://cloudposse.atlassian.net/browse/DEV-1589

    Migrating from v1 to v2

    The notable changes in v2 are:

    • v2 works only with atmos >= 1.63.0
    • v2 drops install-terraform input because terraform is not required for affected stacks call
    • v2 drops atmos-gitops-config-path input and the ./.github/config/atmos-gitops.yaml config file. Now you have to use GitHub Actions environment variables to specify the location of the atmos.yaml.

    The following configuration fields now moved to GitHub action inputs with the same names

    name
    atmos-version
    atmos-config-path

    The following configuration fields moved to the atmos.yaml configuration file.

    name YAML path in atmos.yaml
    aws-region integrations.github.gitops.artifact-storage.region
    terraform-state-bucket integrations.github.gitops.artifact-storage.bucket
    terraform-state-table integrations.github.gitops.artifact-storage.table
    terraform-state-role integrations.github.gitops.artifact-storage.role
    terraform-plan-role integrations.github.gitops.role.plan
    terraform-apply-role integrations.github.gitops.role.apply
    terraform-version integrations.github.gitops.terraform-version
    enable-infracost integrations.github.gitops.infracost-enabled
    sort-by integrations.github.gitops.matrix.sort-by
    group-by integrations.github.gitops.matrix.group-by

    For example, to migrate from v1 to v2, you should have something similar to the following in your atmos.yaml:

    ./.github/config/atmos.yaml

    # ... your existing configuration
    
    integrations:
      github:
        gitops:
          terraform-version: 1.5.2
          infracost-enabled: false
          artifact-storage:
            region: us-east-2
            bucket: cptest-core-ue2-auto-gitops
            table: cptest-core-ue2-auto-gitops-plan-storage
            role: arn:aws:iam::xxxxxxxxxxxx:role/cptest-core-ue2-auto-gitops-gha
          role:
            plan: arn:aws:iam::yyyyyyyyyyyy:role/cptest-core-gbl-identity-gitops
            apply: arn:aws:iam::yyyyyyyyyyyy:role/cptest-core-gbl-identity-gitops
          matrix:
            sort-by: .stack_slug
            group-by: .stack_slug | split("-") | [.[0], .[2]] | join("-")

    .github/workflows/main.yaml

    - name: Selected Components
      id: components
      uses: cloudposse/github-action-atmos-terraform-select-components@v2
      with:
        atmos-config-path: ./rootfs/usr/local/etc/atmos/
        jq-query: 'to_entries[] | .key as $parent | .value.components.terraform | to_entries[] | select(.value.settings.github.actions_enabled // false) | [$parent, .key] | join(",")'

    This corresponds to the v1 configuration (deprecated) below.

    The v1 configuration file ./.github/config/atmos-gitops.yaml looked like this:

    atmos-version: 1.45.3
    atmos-config-path: ./rootfs/usr/local/etc/atmos/
    terraform-state-bucket: cptest-core-ue2-auto-gitops
    terraform-state-table: cptest-core-ue2-auto-gitops
    terraform-state-role: arn:aws:iam::xxxxxxxxxxxx:role/cptest-core-ue2-auto-gitops-gha
    terraform-plan-role: arn:aws:iam::yyyyyyyyyyyy:role/cptest-core-gbl-identity-gitops
    terraform-apply-role: arn:aws:iam::yyyyyyyyyyyy:role/cptest-core-gbl-identity-gitops
    terraform-version: 1.5.2
    aws-region: us-east-2
    enable-infracost: false
    sort-by: .stack_slug
    group-by: .stack_slug | split("-") | [.[0], .[2]] | join("-")  

    And the v1 GitHub Action Workflow looked like this.

    .github/workflows/main.yaml

    - name: Selected Components
      id: components
      uses: cloudposse/github-action-atmos-terraform-select-components@v1
      with:
        atmos-gitops-config-path: ./.github/config/atmos-gitops.yaml
        jq-query: 'to_entries[] | .key as $parent | .value.components.terraform | to_entries[] | select(.value.settings.github.actions_enabled // false) | [$parent, .key] | join(",")'
    

v1.2.0

07 Mar 19:50
65099c6
Compare
Choose a tag to compare
Update cloudposse/github-action-setup-atmos action to v2 @renovate (#21)

This PR contains the following updates:

Package Type Update Change
cloudposse/github-action-setup-atmos action major v1 -> v2

Release Notes

cloudposse/github-action-setup-atmos (cloudposse/github-action-setup-atmos)

v2

Compare Source


v1.1.1

27 Feb 13:03
d3dccc5
Compare
Choose a tag to compare
Update cloudposse/actions action to v0.33.0 @renovate (#2)

This PR contains the following updates:

Package Type Update Change
cloudposse/actions action minor 0.31.0 -> 0.33.0

Release Notes

cloudposse/actions (cloudposse/actions)

v0.33.0

Compare Source

v0.32.0: 0.32.0 Update cloned actions

Compare Source

What's Changed

New Contributors

Full Changelog: cloudposse/actions@0.31.0...0.32.0


Update dcarbone/install-jq-action action to v2 @renovate (#12)

This PR contains the following updates:

Package Type Update Change
dcarbone/install-jq-action action major v1.0.1 -> v2.1.0

Release Notes

dcarbone/install-jq-action (dcarbone/install-jq-action)

v2.1.0

Compare Source

What's Changed
New Contributors

Full Changelog: dcarbone/install-jq-action@v2.0.2...v2.1.0

v2.0.2

Compare Source

What's Changed
New Contributors

Full Changelog: dcarbone/install-jq-action@v2.0.1...v2.0.2

v2.0.1

Compare Source

What's Changed

Full Changelog: dcarbone/install-jq-action@v2.0.0...v2.0.1

v2.0.0

Compare Source

What's Changed
New Contributors

Full Changelog: dcarbone/install-jq-action@v1.0.1...v2.0.0


Update actions/checkout action to v4 @renovate (#11)

This PR contains the following updates:

Package Type Update Change
actions/checkout action major v3 -> v4

Release Notes

actions/checkout (actions/checkout)

v4

Compare Source


Update hashicorp/setup-terraform action to v3 @renovate (#14)

This PR contains the following updates:

Package Type Update Change
hashicorp/setup-terraform action major v2 -> v3

Release Notes

hashicorp/setup-terraform (hashicorp/setup-terraform)

v3

Compare Source


Update nick-fields/assert-action action to v2 @renovate (#19)

This PR contains the following updates:

Package Type Update Change
nick-fields/assert-action action major v1 -> v2

Release Notes

nick-fields/assert-action (nick-fields/assert-action)

v2

Compare Source


v1.1.0

03 Feb 10:13
bbd3e9b
Compare
Choose a tag to compare
Consolidate auto-release workflow @goruha (#18)

what

  • Use cloudposse/github-action-auto-release in auto-release.yaml workflow

why

  • Solve old nodejs warning
  • Reduce duplication of code
Pin atmos install action @goruha (#17)

what

  • Pin atmos install action

v1.0.0

18 Dec 12:47
3cdce92
Compare
Choose a tag to compare
Use GitOps Configuration File @goruha (#15)

what

  • Use a configuration file instead of passing all parameters as inputs

why

  • Makes it easier in reusable workflows to reuse actions without needing to edit workflows themselves
  • Separate business logic from configuration

Migrating from v0 to v1

v1 replace jq-query input with selected-filter variable and simplify the query.
Now you need to specify only part used in select function of jq-query.

v1 moved variables from inputs to atmos gitops config path ./.github/config/atmos-gitops.yaml

name
atmos-version
atmos-config-path

If you want the same behavior in v1 as inv0 you should create config ./.github/config/atmos-gitops.yaml with the same variables as in v1 inputs.

  - name: Selected Components
    id: components
    uses: cloudposse/github-action-atmos-terraform-select-components@v1
    with:
      atmos-gitops-config-path: ./.github/config/atmos-gitops.yaml
      select-filter: '.settings.github.actions_enabled // false'

same behaviour as

  - name: Selected Components
    id: components
    uses: cloudposse/github-action-atmos-terraform-select-components@v0
    with:
      atmos-config-path: "${{ github.workspace }}/rootfs/usr/local/etc/atmos/"
      jq-query: 'to_entries[] | .key as $parent | .value.components.terraform | to_entries[] | select(.value.settings.github.actions_enabled // false) | [$parent, .key] | join(",")'