• Terraform is an automation tool, but not the same kind of tool as Ansible.
    To understand Terraform clearly, let’s start with a simple comparison.

    Terraform vs Ansible: key differences

    You already know that Ansible is used to configure existing devices and maintain their configuration over time.
    As shown in the figure below, Ansible connects to infrastructure that already exists and pushes configuration changes to it.

    Ansible configuration management existing infrastructure

    Figure 1 - Configuration management

    Here is the key difference you must remember:

    • Ansible manages the configuration of existing infrastructure

    • Terraform creates the infrastructure resources

    Yes, this can feel surprising at first.

    Until now, you have always worked with infrastructure that already exists:

    • in the CLI, you connect to routers or switches that are already deployed

    • with Ansible, devices are already reachable on the network

    Infrastructure provisioning with Terraform

    With Terraform, the logic is different.
    As shown in the figure below, Terraform allows you to describe the infrastructure you want before it even exists.

    Terraform infrastructure provisioning resources

    Figure 2 - Infrastructure provisioning

    In this example, Terraform is used to create virtual machines, but the idea is broader.
    Terraform is used to create infrastructure resources.

    Why Terraform matters for networking

    It is important to clarify one thing: Terraform does not create physical routers or switches by itself.
    Instead, it is mainly used in cloud and virtualized environments, where infrastructure and networking components can be created programmatically.

    At this point, you might be thinking:

    “Okay, but why are we learning Terraform for the CCNA? What does this have to do with networking?”

    The answer is that modern networks are increasingly deployed inside infrastructures that are built automatically, not only configured manually.

    As a network engineer, you need to understand the difference between:

    • building infrastructure with Terraform

    • configuring and maintaining it with Ansible

    For the CCNA, you are not expected to use Terraform to configure routers.
    You are expected to understand when Terraform is used in a network workflow, and how it differs from configuration tools like Ansible.

    In the next section, we will break down how Terraform works step by step.

    Answer the question below

    Terraform is used to ______ infrastructure.