All Projects → intuit → cfn-deploy

intuit / cfn-deploy

Licence: MIT license
A useful GitHub Action to help you deploy cloudformation templates

Programming Languages

shell
77523 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to cfn-deploy

takomo
Organize, parameterize and deploy your CloudFormation stacks
Stars: ✭ 27 (+92.86%)
Mutual labels:  cloudformation, deploy, deployment-automation
useful-playbooks
🚚 Useful Ansible playbooks for easily deploy your website or webapp to absolutely fresh remote virtual server and automation many processes. Only 3 minutes from the playbook run to complete setup server and start it.
Stars: ✭ 52 (+271.43%)
Mutual labels:  deploy, deployment-automation
Meli
Platform for deploying static sites and frontend applications easily. Automatic SSL, deploy previews, reverse proxy, and more.
Stars: ✭ 2,125 (+15078.57%)
Mutual labels:  deploy, deployment-automation
Github Pages Deploy Action
Automatically deploy your project to GitHub Pages using GitHub Actions. This action can be configured to push your production-ready code into any branch you'd like.
Stars: ✭ 2,507 (+17807.14%)
Mutual labels:  deploy, github-actions
bitops
Automate the provisioning and configuration of cloud infrastructure.
Stars: ✭ 28 (+100%)
Mutual labels:  cloudformation, deployment-automation
aws-customer-churn-pipeline
An End to End Customer Churn Prediction solution using AWS services.
Stars: ✭ 30 (+114.29%)
Mutual labels:  cloudformation, deploy
action-netlify-deploy
🙌 Netlify deployments via GitHub actions
Stars: ✭ 32 (+128.57%)
Mutual labels:  deploy, github-actions
cfn-lint-action
GitHub Action for interacting with CloudFormation Linter
Stars: ✭ 41 (+192.86%)
Mutual labels:  cloudformation, github-actions
actions-deploy-gist
📌 Deploy file to Github Gist
Stars: ✭ 26 (+85.71%)
Mutual labels:  deploy, github-actions
ftp-action
Automate copying your files via FTP using this GitHub action.
Stars: ✭ 90 (+542.86%)
Mutual labels:  deploy, github-actions
actions-publish-gh-pages
🍣 A GitHub Action to publish static website using GitHub Pages
Stars: ✭ 12 (-14.29%)
Mutual labels:  github-actions
pangyo-smilecook
🍱 Github Actions를 활용한 판교 한식뷔페 스마일쿡 식단 슬랙봇
Stars: ✭ 12 (-14.29%)
Mutual labels:  github-actions
review-pdf-generator-action
builds PDF via Re:VIEW and uploads as Artifacts
Stars: ✭ 15 (+7.14%)
Mutual labels:  github-actions
actions-NjuHealthReport
Github Actions: 完成每日健康填报打卡,So easy
Stars: ✭ 68 (+385.71%)
Mutual labels:  github-actions
setup-jdk
(DEPRECATED) Set up your GitHub Actions workflow with a specific version of AdoptOpenJDK
Stars: ✭ 32 (+128.57%)
Mutual labels:  github-actions
eks-cluster
Quickly spin up an AWS EKS Kubernetes cluster using AWS CloudFormation
Stars: ✭ 41 (+192.86%)
Mutual labels:  cloudformation
apprise-ga
GitHub Action to send a dynamic push notification to every single platform thanks to the Apprise library
Stars: ✭ 18 (+28.57%)
Mutual labels:  github-actions
hackernews-button
Privacy-preserving Firefox extension linking to Hacker News discussion; built with Bloom filters and WebAssembly
Stars: ✭ 73 (+421.43%)
Mutual labels:  github-actions
kahoy
Simple Kubernetes raw manifests deployment tool
Stars: ✭ 33 (+135.71%)
Mutual labels:  deploy
actions-clever-cloud
GitHub Action to deploy to Clever Cloud
Stars: ✭ 32 (+128.57%)
Mutual labels:  github-actions

cfn-deploy

cfn-deploy

A simple github action to deploy cloudformation yaml files to AWS

Usage

An example workflow for deploying a cloudformation template follows.

 - uses: intuit/cfn-deploy@master
      env:
        AWS_REGION: us-east-2
        STACK_NAME: cfn-deploy
        TEMPLATE_FILE: ec2.yml
        PARAMETERS_FILE: parameter.json
        CAPABLITIES: CAPABILITY_IAM
        AWS_ACCESS_KEY_ID: ${{secrets.AWS_ACCESS_KEY_ID}}
        AWS_SECRET_ACCESS_KEY: ${{secrets.AWS_SECRET_ACCESS_KEY}}
        SLACK_WEBHOOK_URL: ${{secrets.SLACK_WEBHOOK_URL}}
        GITHUB_JOB_LINK: ${{github.server_url}}/${{github.repository}}/actions/runs/${{github.run_id}}
        NOTIFICATION_ARNS: ("arn:aws:sns:us-east-2:012345678910:topic1" "arn:aws:sns:us-east-2:012345678910:topic2")

Note: The stack will created if it does not exist. If the initial stack creation fails for some reason then it will be deleted instead of rolled back.

Secrets

  • AWS_ACCESS_KEY_ID – (Required) The AWS access key part of your credentials more info

  • AWS_SECRET_ACCESS_KEY – (Required) The AWS secret access key part of your credentials more info

Environment variables

All environment variables listed in the official documentation are supported.

The custom env variables to be added are:

AWS_REGION - Region to which you need to deploy your app
STACK_NAME - Cloudformation Stack Name
TEMPLATE_FILE - Cloudformation template yaml file
PARAMETERS_FILE - (If required) Input parameters to the cloudformation stack as json file
CAPABLITIES - IAM capablities for the cloudformation stack

Optional

WAIT_TIMEOUT - Timeout in seconds to exit from "wait" of create/update stack
SLACK_WEBHOOK_URL - Webhook url for Slack Notification. Refer Slack Documentation
GITHUB_JOB_LINK - Link to the Gihub Job
NOTIFICATION_ARNS - List of SNS topic ARNS to get stack updates

Nested Stacks

Nested stacks creation is supported. You create a nested stack within another stack by using the AWS::CloudFormation::Stack resource.

Your root stack template should contain resource definitions for your nested stacks with the S3 URLs of their templates.

An example of a root stack template:

{
    "AWSTemplateFormatVersion" : "2010-09-09",
    "Resources" : {
        "myStack" : {
	       "Type" : "AWS::CloudFormation::Stack",
	       "Properties" : {
	        "TemplateURL" : "https://s3.amazonaws.com/cloudformation-templates-us-east-1/S3_Bucket.template",
              "TimeoutInMinutes" : "60"
	       }
        }
    },
    "Outputs": {
       "StackRef": {"Value": { "Ref" : "myStack"}},
       "OutputFromNestedStack" : {
             "Value" : { "Fn::GetAtt" : [ "myStack", "Outputs.BucketName" ] }
       }
    }
}

Refer to AWS docs for additional help: Working with nested stacks

More example template snippets: AWS CloudFormation template snippets

Test Github Actions while development

Prerequisites

Depend on your machine follow the installation process.

Act Setup

For macOS

brew install act

for Windows

choco install act-cli
or
scoop install act

Other installation options

curl https://raw.githubusercontent.com/nektos/act/master/install.sh | sudo bash

Docker Setup

Act uses docker to run workflows.

For macOS, follow instructions given here

For Windows, follow instructions given here

How to start

Act is an open source project which allows you to run project workflow locally. This workflow(s) are in the form of YAML file (can be either .yml or .yaml) residing in .github/workflows/ folder of your project directory.

For more on workflow syntax, follow here

To test your setup, is working fine or not, run below command. It will list the actions

act -l

It will list all workflows

ID               Stage  Name
linter           0      linter
TestOnYourLocal  0      TestOnYourLocal

To run Act specific workflow or yaml/yml file within .github/workflows/ folder on your branch, you need github token

act -W .github/workflows/testlocally.yml

Dryrun mode

act -n -W .github/workflows/testlocally.yml

If you want to run for specific branch, you need to mention same in workflow file and also need to pass github token, which can be generated here

act -n -W .github/workflows/testlocally.yml -s GITHUB_TOKEN=$GITHUB_TOKEN

Here is the sample for reference Demo

Contributing

See Contributing

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].