Terraform and Ansible a Great Combination

In this vlog, Robert shows you why Ansible and Terraform are such a good combination.

Maybe you’ve seen Terraform, Terraform is really good at spinning up or managing resources on any cloud provider. These can be many different types of resources, like volumes, load balancers, any kind of resources basically. Terraform is not really good at configuring these instances. Terraform can create the resources and that is about it. Ansible is really good at managing these resources. That’s why we should try to combine them. In this vlog Robert shows you how Terraform writes an Ansible inventory file.

Robert has prepared a very simple example. He will show you that Terraform will drop an inventory file that can be picked up by Ansible. The prepared Ansible Playbook then will make a mail server out of this instance. Of course, you can use any role and any task. This demo will show you that Ansible is much better in configuring the instance then Terraform is. Terraform has a few hooks that you can use, but is never as good as a configuration management system.

Conclusion

  • Terraform is really good at spinning up resources
  • Ansible is really good at managing those
  • Terraform and Ansible work very well and seamlessly together