This action performs an AWS CloudFormation deployment, handling all states properly and waiting for current updates & rollbacks to complete
Required The name of the cloudformation template.
Required The name of the cloudformation stack.
A space-separated list of stack capabilities.
A space-separated list of stack parameters, each formatted as Key=Value
.
Always pass the GitHub workflow step, even if the deployment fails (useful for running tests)
Debug-level logging of all cloudformation api commands and their responses
The final status of the stack being deployed
An error message, if the stack ends in a failed state
uses: clausehq/[email protected]
with:
template: cfn-template-yml
stack-name: my-test-stack
capabilities: CAPABILITY_IAM CAPABILITY_NAMED_IAM
parameters: Parameter0=Value0 Parameter1=Value1
Tests in this repository are run by means of GitHub Actions. There are a number of Repository Secrets that need to be created in order for these tests to be able to run.
- Create a new IAM user in the AWS Account where you want these tests to create and delete cloudformation stacks
- Choose
Programmatic Access
when being asked to select an Access Type - When being asked to configure user permissions, choose
Attach existing policies directly
- Click
Create Policy
- Select the
JSON
tab - Configure the following policy:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"cloudformation:*"
],
"Resource": "arn:aws:cloudformation:YOUR_REGION:YOUR_AWS_ACCOUNT_NR:stack/aws-cfn-deploy-action-test/*"
},
{
"Effect": "Allow",
"Action": [
"logs:*"
],
"Resource": "*"
}
]
}
- Set the user's AWS access key id as the value of a Repository Secret named
AWS_ACCESS_KEY_ID
- Set the user's AWS secret access key as the value of a Repository Secret named
AWS_SECRET_ACCESS_KEY
- Configure an incoming webhook to the slack channel where you want to receive failure notifications
- Set the webhook url as the value of a Repository Secret named
SLACK_WEBHOOK_URL