Skip to content

malconip/terraform-aws-vpc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

terraform-aws-vpc

A playground for aws vpc with terraform

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]:malconip/terraform-aws-vpc.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

About

A playground for aws vpc with terraform

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages