A playground for aws vpc with terraform
Pre-requisites:
- A setup AWS account
- Git installed on your machine
- Clone the repo
git@github.com:malconip/terraform-aws-vpc.git
- Install the Terraform binary
- Set your bash variables locally
export AWS_ACCESS_KEY_ID=[your-key]
export AWS_SECRET_ACCESS_KEY=[your-key]
terraform init
to initialise Terraform- Update the
main.tf
file and setbucket
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) - Execute
terraform apply
(typeyes
)
- Uncomment the backend configuration in
main.tf
- Execute
terraform init
(typeyes
to move your state) - Set your AWS
AWS_ACCESS_KEY_ID
andAWS_SECRET_ACCESS_KEY
as repo secrets @ github.com/[your-username]/[your-repo]/settings/secrets/new git add .
andgit commit -m "First commit"
to commit any changesgit push
to push to github