title: A short introduction to using Terraform with Ansible to provision Heroku apps author: name: Henry url: https://github.com/simpleweb/be-tribe-terraform-heroku-presentation output: slides.html style: slides.css theme: jdan/cleaver-retro controls: true
--
- Why Terraform?
- Why Ansbile?
--
--
- README.md
- script/provision
--
- infrastructure.yml
- roles/app/main.yml
- vars.yml (production and shared)
--
- roles/app/files/main.tf
- roles/app/templates/vars.tfvars.j2
--
Split up configuration & re-use them
--
${client}-${layer/service/team/role/purpose}-${environment}
e.g. simpleweb-app-staging
--
- Local file
- "Remote" PostgreSQL DB
- Many more...
--
--
--
--
--
--
- Modules
- Outputs
- Importing existing resources
- Data sources
- Lots of funky logic you can (and can’t [easily]) do to make your templates powerful/illegible
- Plenty more
--
- Actually deploying code
--
All in or else chaos - https://devcenter.heroku.com/articles/using-terraform-with-heroku#best-practices
--
--
--
--
--
- Try without Ansible first
- Maybe try with a local state file
- It's like AWS CloudFormation but...
--
--
- https://www.terraform.io/guides/core-workflow.html
- https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/best-practices.html
--