@@ -13,7 +13,7 @@ Deploys AWS CloudFormation Stacks.
1313 with :
1414 name : MyStack
1515 template : myStack.yaml
16- parameter-overrides : " MyParam1=myValue,MyParam2=${{ secrets.MY_SECRET_VALUE }}"
16+ parameter-overrides : ' MyParam1=myValue,MyParam2=${{ secrets.MY_SECRET_VALUE }}'
1717` ` `
1818
1919The action can be passed a CloudFormation Stack ` name` and a `template` file. The `template` file can be a local file existing in the working directory, or a URL to template that exists in an [Amazon S3](https://aws.amazon.com/s3/) bucket. It will create the Stack if it does not exist, or create a [Change Set](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-changesets.html) to update the Stack. An update fails by default when the Change Set is empty. Setting `fail-on-empty-changeset: false` will override this behavior and not throw an error.
@@ -39,7 +39,7 @@ This action supports three modes of operation for better change set management:
3939 id: create-changeset
4040 uses: aws-actions/aws-cloudformation-github-deploy@v1
4141 with:
42- mode: " create-only"
42+ mode: ' create-only'
4343 name: MyStack
4444 template: myStack.yaml
4545
@@ -58,7 +58,7 @@ This action supports three modes of operation for better change set management:
5858- name: Execute Change Set
5959 uses: aws-actions/aws-cloudformation-github-deploy@v1
6060 with:
61- mode: " execute-only"
61+ mode: ' execute-only'
6262 name: MyStack
6363 execute-change-set-id: ${{ steps.create-changeset.outputs.change-set-id }}
6464` ` `
@@ -71,10 +71,10 @@ Create change sets that can revert resource drift:
7171- name: Create Drift-Reverting Change Set
7272 uses: aws-actions/aws-cloudformation-github-deploy@v1
7373 with:
74- mode: " create-only"
74+ mode: ' create-only'
7575 name: MyStack
7676 template: myStack.yaml
77- deployment-mode: " REVERT_DRIFT"
77+ deployment-mode: ' REVERT_DRIFT'
7878` ` `
7979
8080# ## PR Review Workflow
8888 pull_request:
8989 types: [opened, synchronize, reopened]
9090 paths:
91- - " **.yaml"
92- - " **.yml"
91+ - ' **.yaml'
92+ - ' **.yml'
9393
9494permissions:
9595 id-token: write
@@ -112,10 +112,10 @@ jobs:
112112 id: create-cs
113113 uses: aws-actions/aws-cloudformation-github-deploy@v1
114114 with:
115- mode: " create-only"
115+ mode: ' create-only'
116116 name: pr-review-${{ github.event.pull_request.number }}
117117 template: template.yaml
118- parameter-overrides: " Environment=preview"
118+ parameter-overrides: ' Environment=preview'
119119 continue-on-error: true
120120
121121 - name: Post change set review
@@ -234,23 +234,21 @@ This action requires the following minimum set of permissions:
234234
235235` ` ` json
236236{
237- "Version": "2012-10-17",
238- "Statement": [
239- {
240- "Effect": "Allow",
241- "Action": [
242- "cloudformation:CreateStack",
243- "cloudformation:DescribeStacks",
244- "cloudformation:CreateChangeSet",
245- "cloudformation:DescribeChangeSet",
246- "cloudformation:DeleteChangeSet",
247- "cloudformation:ExecuteChangeSet",
248- "cloudformation:DescribeStackEvents",
249- "cloudformation:DescribeEvents"
250- ],
251- "Resource": "*"
252- }
253- ]
237+ "Version": "2012-10-17",
238+ "Statement": [
239+ {
240+ "Effect": "Allow",
241+ "Action": [
242+ "cloudformation:DescribeStacks",
243+ "cloudformation:CreateChangeSet",
244+ "cloudformation:DescribeChangeSet",
245+ "cloudformation:DeleteChangeSet",
246+ "cloudformation:ExecuteChangeSet",
247+ "cloudformation:DescribeEvents"
248+ ],
249+ "Resource": "*"
250+ }
251+ ]
254252}
255253` ` `
256254
@@ -280,9 +278,13 @@ The action makes the following AWS CloudFormation API calls depending on the ope
280278
281279**Error Reporting (when change set creation fails):**
282280
283- - ` DescribeStackEvents ` - Retrieve detailed error information for validation failures
281+ - ` DescribeEvents ` - Retrieve detailed error information for validation failures
284282- ` DeleteChangeSet` - Clean up failed change sets (unless `no-delete-failed-changeset` is set)
285283
284+ **Event Streaming (during stack operations):**
285+
286+ - ` DescribeEvents` - Monitor real-time CloudFormation events during deployment
287+
286288> The policy above prevents the stack from being deleted - add `cloudformation:DeleteStack` if deletion is required for your use case
287289
288290# # Example
@@ -312,43 +314,42 @@ jobs:
312314 outputs:
313315 env-name: ${{ steps.env-name.outputs.environment }}
314316 steps:
315- - name: Checkout
316- uses: actions/checkout@v2
317-
318- - name: Configure AWS credentials
319- id: creds
320- uses: aws-actions/configure-aws-credentials@v1
321- with:
322- aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
323- aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
324- aws-region: ${{ github.event.inputs.region}}
325-
326- - name: Configure environment name
327- id: env-name
328- env:
329- REPO: ${{ github.repository }}
330- run: |
331- ENVIRONMENT=` echo $REPO | tr "/" "-"`
332- echo "Environment name : $ENVIRONMENT"
333- echo "environment=$ENVIRONMENT" >> $GITHUB_OUTPUT
334-
335- - name : Deploy Amazon EKS Cluster
336- id : eks-cluster
337- uses : aws-actions/aws-cloudformation-github-deploy@master
338- with :
339- name : ${{ steps.env-name.outputs.environment }}-cluster
340- template : https://s3.amazonaws.com/aws-quickstart/quickstart-amazon-eks/templates/amazon-eks-master.template.yaml
341- fail-on-empty-changeset : false
342- parameter-overrides : >-
343- AvailabilityZones=${{ github.event.inputs.region }}a,
344- AvailabilityZones=${{ github.event.inputs.region }}c,
345- KeyPairName=${{ github.event.inputs.keypair }},
346- NumberOfAZs=2,
347- ProvisionBastionHost=Disabled,
348- EKSPublicAccessEndpoint=Enabled,
349- EKSPrivateAccessEndpoint=Enabled,
350- RemoteAccessCIDR=0.0.0.0/0
317+ - name: Checkout
318+ uses: actions/checkout@v2
319+
320+ - name: Configure AWS credentials
321+ id: creds
322+ uses: aws-actions/configure-aws-credentials@v1
323+ with:
324+ aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
325+ aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
326+ aws-region: ${{ github.event.inputs.region}}
351327
328+ - name: Configure environment name
329+ id: env-name
330+ env:
331+ REPO: ${{ github.repository }}
332+ run: |
333+ ENVIRONMENT=` echo $REPO | tr "/" "-"`
334+ echo "Environment name : $ENVIRONMENT"
335+ echo "environment=$ENVIRONMENT" >> $GITHUB_OUTPUT
336+
337+ - name : Deploy Amazon EKS Cluster
338+ id : eks-cluster
339+ uses : aws-actions/aws-cloudformation-github-deploy@master
340+ with :
341+ name : ${{ steps.env-name.outputs.environment }}-cluster
342+ template : https://s3.amazonaws.com/aws-quickstart/quickstart-amazon-eks/templates/amazon-eks-master.template.yaml
343+ fail-on-empty-changeset : false
344+ parameter-overrides : >-
345+ AvailabilityZones=${{ github.event.inputs.region }}a,
346+ AvailabilityZones=${{ github.event.inputs.region }}c,
347+ KeyPairName=${{ github.event.inputs.keypair }},
348+ NumberOfAZs=2,
349+ ProvisionBastionHost=Disabled,
350+ EKSPublicAccessEndpoint=Enabled,
351+ EKSPrivateAccessEndpoint=Enabled,
352+ RemoteAccessCIDR=0.0.0.0/0
352353` ` `
353354
354355### Proxy Configuration
@@ -365,7 +366,7 @@ with:
365366 name : eks-primary
366367 template : https://s3.amazonaws.com/aws-quickstart/quickstart-amazon-eks/templates/amazon-eks-master.template.yaml
367368 fail-on-empty-changeset : false
368- http-proxy : " http://companydomain.com:3128"
369+ http-proxy : ' http://companydomain.com:3128'
369370` ` `
370371
371372Proxy configured in the environment variable:
0 commit comments