Created
October 4, 2017 07:35
-
-
Save chrislewisdev/990bed385118e2082976b872a35c8971 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
notifications: | |
email: false | |
#Install a Terraform executable locally | |
before_install: | |
- wget https://releases.hashicorp.com/terraform/0.10.6/terraform_0.10.6_linux_amd64.zip | |
- unzip terraform_0.10.6_linux_amd64.zip | |
#These two steps will effectively validate our terraform and output a list of any changes to be made to our infrastructure | |
script: | |
- ./terraform init | |
- ./terraform plan | |
deploy: | |
#Roll out any terraform changes required | |
- provider: script | |
script: | |
- ./terraform apply | |
skip_cleanup: true | |
on: | |
branch: master | |
#Upload our website contents to the S3 bucket that terraform created | |
- provider: s3 | |
access_key_id: $AWS_ACCESS_KEY_ID | |
secret_access_key: $AWS_SECRET_ACCESS_KEY | |
bucket: "hello-world.com" | |
region: "ap-southeast-2" | |
local_dir: website | |
on: | |
branch: master |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment