2 ms·
Terraform excels at provisioning resources, and Ansible excels at configuring resources, but can also provision most things as-needed. For simpler things (eg s
by geerlingguy 6y ago
Terraform excels at provisioning resources, and Ansible excels at configuring resources, but can also provision most things as-needed.
For simpler things (eg small infra where I might need to configure a route 53 domain, a few EC2 instances, and something in RDS), I would stick with Ansible since I can do everything from AMI build to provision to reconfigure/deploy with it.
But for a lot of more complicated things, I do use Terraform. I'm working on a good example of using Terraform with GCP for Kubernetes in my next book, and will likely also show how I still tie things together with Ansible.
- Cyph0n 6y agoFor provisioning, Packer + Ansible seems like a great combination. I used both recently to setup a Discourse site and associated Postfix mail server. Packer spins up the machines and then calls Ansible to handle the actual provisioning. Once that’s done, Packer takes a snapshot of each machine, so you end up with images that are ready for deployment with, e.g., Terraform. Granted, this was just a toy project for me to try these tools out, so any advice would be appreciated!