From 062535ca4098f4d64e18bf1bb7725a0eb01eb0a3 Mon Sep 17 00:00:00 2001 From: Chris Kalafarski Date: Fri, 21 Jun 2024 12:45:04 -0400 Subject: [PATCH] Set termination protection --- .github/workflows/deploy.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index c5a1471..bada253 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -40,13 +40,19 @@ jobs: - name: Deploy CloudFormation stack run: | rm samconfig.toml + + stack_name=health-events-toolkit + sam build && sam deploy \ --region us-east-2 \ --no-confirm-changeset \ --no-fail-on-empty-changeset \ - --stack-name health-events-toolkit \ + --stack-name "$stack_name" \ --resolve-s3 \ --no-progressbar \ - --s3-prefix health-events-toolkit \ + --s3-prefix "$stack_name" \ --capabilities CAPABILITY_IAM \ --role-arn arn:aws:iam::048723829744:role/PRX-GHA-ServiceRoleForCloudFormation + aws cloudformation update-termination-protection \ + --stack-name "$stack_name" + --enable-termination-protection