Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
6e84e6f
move terraform install to cloudposse-github-actions/install-gh-releases
milldr Apr 25, 2025
6ff9768
Disable caching in action.yml for testing
milldr Apr 25, 2025
98b7af4
debug action
milldr Apr 29, 2025
f4cf230
debug action
milldr Apr 29, 2025
cb6131c
debug action
milldr Apr 29, 2025
062ccd0
debug action
milldr Apr 29, 2025
3277717
extension-matching: true
milldr Apr 29, 2025
f746bcd
debug action
milldr Apr 29, 2025
9fcc586
debug action
milldr Apr 29, 2025
3dd8c73
try literals
milldr Apr 29, 2025
2ac4d2b
try literals
milldr Apr 29, 2025
a1ba0fa
use bash script to install tf
milldr Apr 29, 2025
26aa9d0
use bash script to install tf
milldr Apr 29, 2025
c0b3072
use bash script to install tf
milldr Apr 29, 2025
ad155d8
use bash script to install tf
milldr Apr 29, 2025
a1203e4
debug action
milldr Apr 29, 2025
bcd8625
try aqua
milldr Apr 29, 2025
0c61115
try aqua
milldr Apr 29, 2025
fcba9b8
Separate tf and opentf
milldr Apr 29, 2025
c1b060a
Separate tf and opentf
milldr Apr 29, 2025
50fcd35
Separate tf and opentf
milldr Apr 29, 2025
357eee8
Separate tf and opentf
milldr Apr 29, 2025
73dbcac
Separate tf and opentf
milldr Apr 29, 2025
4b0b059
Separate tf and opentf
milldr Apr 29, 2025
f85c126
dynamically update aqua config
milldr Apr 29, 2025
aaab5fa
Enabled debug mode
milldr Apr 29, 2025
271fe3a
Enabled debug mode
milldr Apr 29, 2025
22d9cc1
fixed opentofu
milldr Apr 29, 2025
e8a5cc6
cache aqua
milldr Apr 29, 2025
cbc7db8
moved aqua config to actions
milldr Apr 29, 2025
18d04d6
use tofu / terraform in the cache key
milldr Apr 29, 2025
5032177
use tofu / terraform in the cache key
milldr Apr 29, 2025
2cd9fb5
debug cache
milldr Apr 29, 2025
a644c60
debug cache
milldr Apr 29, 2025
fb3e43a
debug cache
milldr Apr 29, 2025
bd59fe9
Split summary into step and issue files in drift detection mode
milldr Apr 29, 2025
6d3d437
Refactor moving summary file if it exists only
milldr Apr 29, 2025
db3dff3
debug cache
milldr Apr 29, 2025
222e8e4
debug cache
milldr Apr 29, 2025
450e26e
reset cache changes
milldr Apr 29, 2025
8a8a589
added debug for tf output
milldr May 1, 2025
782c883
missing quote
milldr May 1, 2025
2a454bd
mkdir if summary file dir dne
milldr May 1, 2025
0d90d00
handle errors better
milldr May 1, 2025
2be26ce
Ensure tfcmt is installed for Terraform actions
milldr May 1, 2025
1dd318d
Update aqua_args to aqua_opts in action.yml
milldr May 1, 2025
28b6209
Fix aqua install
milldr May 1, 2025
1077642
Reset changes
milldr May 1, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,5 @@ jobs:
stack: "plat-ue2-sandbox"
atmos-config-path: ${{ runner.temp }}
atmos-version: 1.99.0
skip-checkout: true
skip-checkout: true
debug: true
68 changes: 54 additions & 14 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -176,23 +176,56 @@ runs:
settingsPath: settings.integrations.github.gitops.artifact-storage.cosmos-endpoint
outputPath: cosmos-endpoint

- name: Install Terraform
if: ${{ fromJson(steps.atmos-settings.outputs.settings).terraform-version != '' && fromJson(steps.atmos-settings.outputs.settings).terraform-version != 'null' }}
uses: hashicorp/setup-terraform@v3
- name: Add Terraform and OpenTofu to Aqua
shell: bash
run: |
cat << EOF > aqua.yaml
registries:
- type: standard
ref: v4.233.0
packages:
- name: suzuki-shunsuke/tfcmt@v4.14.5
EOF

# Add Terraform if specified
if [[ "${{ fromJson(steps.atmos-settings.outputs.settings).terraform-version }}" != "" && "${{ fromJson(steps.atmos-settings.outputs.settings).terraform-version }}" != "null" ]]; then
VERSION="${{ fromJson(steps.atmos-settings.outputs.settings).terraform-version }}"
if [[ ! "$VERSION" =~ ^v ]]; then
VERSION="v$VERSION"
fi
echo " - name: hashicorp/terraform@$VERSION" >> aqua.yaml
fi

# Add OpenTofu if specified
if [[ "${{ fromJson(steps.atmos-settings.outputs.settings).opentofu-version }}" != "" && "${{ fromJson(steps.atmos-settings.outputs.settings).opentofu-version }}" != "null" ]]; then
VERSION="${{ fromJson(steps.atmos-settings.outputs.settings).opentofu-version }}"
if [[ ! "$VERSION" =~ ^v ]]; then
VERSION="v$VERSION"
fi
echo " - name: opentofu/opentofu@$VERSION" >> aqua.yaml
fi

# Debug output if debug is enabled
if [[ "${{ inputs.debug }}" == "true" ]]; then
echo "Generated aqua.yaml:"
cat aqua.yaml
fi

- name: Cache Aqua
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
with:
terraform_version: ${{ fromJson(steps.atmos-settings.outputs.settings).terraform-version }}
terraform_wrapper: false
path: ~/.local/share/aquaproj-aqua
key: v2-aqua-installer-${{runner.os}}-${{runner.arch}}-${{hashFiles('aqua.yaml')}}
restore-keys: |
v2-aqua-installer-${{runner.os}}-${{runner.arch}}-

- name: Install Dependencies
uses: cloudposse-github-actions/install-gh-releases@v1
- name: Install dependencies with Aqua
uses: aquaproj/aqua-installer@5e54e5cee8a95ee2ce7c04cb993da6dfad13e59c # v3.1.2
with:
cache: true
config: |-
opentofu/opentofu:
tag: ${{ startsWith(fromJson(steps.atmos-settings.outputs.settings).opentofu-version, 'v') && fromJson(steps.atmos-settings.outputs.settings).opentofu-version || format('v{0}', fromJson(steps.atmos-settings.outputs.settings).opentofu-version) }}
skip: ${{ fromJson(steps.atmos-settings.outputs.settings).opentofu-version == '' || fromJson(steps.atmos-settings.outputs.settings).opentofu-version == 'null' }}
suzuki-shunsuke/tfcmt:
tag: v4.14.0
aqua_version: v2.50.0
env:
AQUA_CONFIG: aqua.yaml
AQUA_LOG_LEVEL: debug

- name: Configure Plan AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
Expand Down Expand Up @@ -265,6 +298,13 @@ runs:
id: atmos-plan
shell: bash
run: |
# Verify tfcmt is installed
# Since we disable exit on error, the real error will be swallowed later on
echo "Ensure tfcmt is installed:"
tfcmt --version

# Disable exit on error so we can capture the terraform exit code
# and handle it appropriately later in the script
set +e

# Remove the environment file from the cache to avoid conflicts with workspace select
Expand Down
Loading