• Skip to main content
  • Skip to header right navigation
  • Skip to site footer

Roger Perkin

Learn Network Automation

  • Network Automation
    • Ansible
    • Python
    • Terraform
    • pyATS
    • Git
    • Postman
  • ISE
  • Cisco
    • SD WAN Training
    • Password Recovery
    • Software-Upgrade-Guides
    • BGP
    • Data Center
    • WIRELESS
  • Blog
    • CCIE Blog
  • COURSES

Terraform vs Ansible

What are the differences between Terraform and Ansible?

Page Contents

  • What are the differences between Terraform and Ansible?
  • PacketPushers Podcast:
  • Ansible vs Terraform For Network Automation
  • Terraform vs Ansible at a glance
  • PacketPushers – Heavy Networking – Videos
  • Cloud networking with Terraform

Terraform is an open-source tool developed by HashiCorp that allows users to manage cloud services through a language named HashiCorp Configuration Language (HCL). Currently, Terraform supports 200 providers, including public cloud, private cloud, and SaaS providers.

There is also a paid product called Terraform Enterprise which provides support and extra governence.
Click here for Enterprise Pricing

Ansible is also an open-source product owned by IBM (RedHat) and is an IT automation and orchestration platform which was primarily used for Linux server admin, but is now being used heavily for network automation and windows management.

As with Terraform there is also a paid product called the Red Hat Ansible Automation Platform. Click here for Pricing

Both products are open source and free to use, however if you want to have the option of tighter security and support both have paid options.

PacketPushers Podcast:

Ansible vs Terraform For Network Automation

Whilst Terraform and Ansible share many similarities, both tools can deploy code and infrastructure in complex network environments.

However, they are very different tools in the way they operate.

Terraform operates in a declarative nature, you declare the state you want your infrastructure to be (via the Terraform file) and then let Terraform worry about how to make and push those changes.

With Ansible you have to define how to make each of the changes with different tasks in your playbook. In order to use Ansible, you need to know how you want to configure something so you can make Ansible do it.

Terraform vs Ansible at a glance

ansible logo - rogers ccie blog
terraform logo
ANSIBLETERRAFORM
Stateless.
Push out the intent of a playbook. Ansible has no view of what has gone before.
Stateful.
Keeps a state and looks to ensure the config matches the state. Is aware of all previous changes.
Very much focused on infrastructure automation.More focused on cloud automation.
Modules are written in Python.Providers are written in Go
Playbooks are written in YAML.Terraform config file is written in HCL
Hashicorp configuration language.
Ansible is owned and developed by IBM (RedHat) Terraform is owned and developed by Hashicorp
Ansible uses SSH to connect to devices Terraform does not use SSH directly and expects a plugin or provider.

Ansible is probably at this moment in time the best solution for network automation however Terraform has an ACI module which could be really helpful if you are spinning up large DC infrastructure which you need to replicate.

PacketPushers – Heavy Networking – Videos

Cloud networking with Terraform

Category: Terraform
Previous Post: « herman miller ergonomic office chair 5 Best Ergonomic Office Chairs UK
Next Post: Terraform Associate Certification terraform certified associate logo »

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Let’s get started

Take a look at my premium courses on Ansible, Nornir & Git or buy them all with the Network Automation Bundle!

Network Automation Courses

Social

Follow along on social media

Contact

Get in touch with me here

[email protected]

Navigation

Home

Blog

About

Contact

YouTube

Don’t forget to take a look at my YouTube Channel

youtube button

Copyright © 2021 · Roger Perkin · All Rights Reserved · Powered by Mai Theme