Skip to content

Commit

Permalink
Add diff command to deploy script.
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelconnor00 committed Feb 29, 2024
1 parent 4c0601a commit cdda9b1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/diff.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ jobs:
env:
AWS_ACCOUNT: ${{ secrets.CDK_DEPLOY_ACCOUNT }}
AWS_REGION: ${{ env.AWS_REGION }}
run: cd iac/ && node_modules/aws-cdk/bin/cdk diff
run: export PATH=node_modules/aws-cdk/bin:$PATH && bash ./scripts/deploy.sh DIFF
9 changes: 8 additions & 1 deletion scripts/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,14 @@ if [ -z "$AWS_ACCOUNT" ]; then
exit 1
fi

cdk deploy \
if [ $1 = "DIFF" ]
then
CMD="diff"
else
CMD="deploy"
fi

cdk $CMD \
-c aws_region=$AWS_REGION \
-c aws_account=$AWS_ACCOUNT \
--require-approval never
19 changes: 0 additions & 19 deletions scripts/diff.sh

This file was deleted.

0 comments on commit cdda9b1

Please sign in to comment.