Giter Club home page Giter Club logo

terraform-aws-github-action-bootstrap's Introduction

Terraform Github Actions Bootstrap

Allows you to bootstrap a Terraform project on AWS using Github Actions. The purpose of the project is to make a simple sandbox for experimenting with Terraform resources using a CI pipeline.

For the companion article, check out: https://www.thedevcoach.co.uk/setup-terraform-aws-github-actions/

Setup Steps

Pre-requisites:

  • A setup AWS account
  • Git installed on your machine

Step 1: Create the backend bucket

  1. Clone the repo [email protected]:loujaybee/terraform-aws-github-action-bootstrap.git
  2. Install the Terraform binary
  3. Set your bash variables locally
    • export AWS_ACCESS_KEY_ID=[your-key]
    • export AWS_SECRET_ACCESS_KEY=[your-key]
  4. terraform init to initialise Terraform
  5. Update the main.tf file and set bucket property of the backend and s3 resource blocks (yes, even the one that's commented out, we'll need it as part of step 8)
  6. Execute terraform apply (type yes)

Step 2: Run Terrafrom on Github Actions

  1. Uncomment the backend configuration in main.tf
  2. Execute terraform init (type yes to move your state)
  3. Set your AWS AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY as repo secrets @ github.com/[your-username]/[your-repo]/settings/secrets/new
  4. git add . and git commit -m "First commit" to commit any changes
  5. git push to push to github

Having Problems?

Raise an issue

terraform-aws-github-action-bootstrap's People

Contributors

loujaybee avatar timwisbauer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.