Skip to content

Commit

Permalink
soerenmartius/fix-drift-detection (#151)
Browse files Browse the repository at this point in the history
  • Loading branch information
soerenmartius authored Apr 23, 2024
2 parents b01531b + 1c83df4 commit 34713f0
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions .github/workflows/drift-detection.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,9 @@ jobs:
asdf plugin add terraform
asdf install terraform
### Check for drifted stacks

- name: List changed stacks
id: list-drifted
run: terramate list -C stacks --cloud-status=drifted

### Configure cloud credentials

- name: Configure AWS credentials
if: steps.list-drifted.outputs.stdout
uses: aws-actions/configure-aws-credentials@v2
with:
aws-region: ${{ env.AWS_REGION }}
Expand All @@ -58,13 +51,11 @@ jobs:
AWS_ACCOUNT_ID: ${{ vars.AWS_ACCOUNT_ID }}

- name: Verify AWS credentials
if: steps.list-drifted.outputs.stdout
run: aws sts get-caller-identity

### Run Dift Check

- name: Run Terraform init on all stacks
if: steps.list-drifted.outputs.stdout
run: |
terramate script run \
-C stacks \
Expand All @@ -74,7 +65,6 @@ jobs:
GITHUB_TOKEN: ${{ github.token }}

- name: Run drift detection
if: steps.list-drifted.outputs.stdout
id: drift-detect
run: |
terramate script run \
Expand All @@ -87,12 +77,12 @@ jobs:
GITHUB_TOKEN: ${{ github.token }}

- name: Run drift reconciliation
if: steps.list-drifted.outputs.stdout
id: drift-reconcile
run: |
terramate script run \
-C stacks \
--tags reconcile \
--cloud-status=drifted \
--parallel 5 \
--continue-on-error \
-- \
Expand Down

0 comments on commit 34713f0

Please sign in to comment.