Replace describe-config for atmos-get-setting, add optional cache and azure storage options #303
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Integration Tests" | |
on: | |
workflow_dispatch: {} | |
pull_request: | |
types: [opened, synchronize, reopened] | |
env: | |
AWS_REGION: us-east-2 | |
# Permissions required for assuming AWS identity | |
permissions: | |
id-token: write | |
contents: read | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
max-parallel: 1 | |
fail-fast: false # Don't fail fast to avoid locking TF State | |
matrix: | |
platform: [terraform, opentofu] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.pull_request.head.ref }} | |
- shell: bash | |
run: | | |
mkdir -p ${{ runner.temp }} | |
cp ./tests/${{ matrix.platform }}/atmos.yaml ${{ runner.temp }}/atmos.yaml | |
sed -i -e 's#__INFRACOST_ENABLED__#false#g' ${{ runner.temp }}/atmos.yaml | |
sed -i -e 's#__STORAGE_REGION__#${{ env.AWS_REGION }}#g' ${{ runner.temp }}/atmos.yaml | |
sed -i -e 's#__STORAGE_BUCKET__#${{ secrets.TERRAFORM_STATE_BUCKET }}#g' ${{ runner.temp }}/atmos.yaml | |
sed -i -e 's#__STORAGE_TABLE__#${{ secrets.TERRAFORM_STATE_TABLE }}#g' ${{ runner.temp }}/atmos.yaml | |
sed -i -e 's#__STORAGE_TABLE__#${{ secrets.TERRAFORM_STATE_TABLE }}#g' ${{ runner.temp }}/atmos.yaml | |
sed -i -e 's#__STORAGE_ROLE__#${{ secrets.TERRAFORM_STATE_ROLE }}#g' ${{ runner.temp }}/atmos.yaml | |
sed -i -e 's#__PLAN_ROLE__#${{ secrets.TERRAFORM_APPLY_ROLE }}#g' ${{ runner.temp }}/atmos.yaml | |
sed -i -e 's#__APPLY_ROLE__#${{ secrets.TERRAFORM_APPLY_ROLE }}#g' ${{ runner.temp }}/atmos.yaml | |
- name: Plan Atmos Component | |
uses: cloudposse/github-action-atmos-terraform-plan@add-cache-and-azure | |
with: | |
component: "foobar" | |
stack: "plat-ue2-sandbox" | |
atmos-config-path: ${{ runner.temp }} | |
atmos-version: 1.99.0 | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.pull_request.head.ref }} | |
- name: Wait 15 sec to wait s3 bucket would be consistent (read after write consistency) | |
shell: bash | |
run: | | |
sleep 15; | |
- name: Apply Atmos Component | |
uses: ./ | |
with: | |
component: "foobar" | |
stack: "plat-ue2-sandbox" | |
atmos-config-path: ${{ runner.temp }} | |
atmos-version: 1.99.0 | |
debug: true |