HomeCloud ComputingAutomation with Any Tooling on Any Interface

Automation with Any Tooling on Any Interface

Terraform expands into the intensive Cisco IOS XE programmability and automation ecosystem

Terraform Cohoe

IOS XE’s huge, programmable characteristic set

The Cisco IOS XE ecosystem is programmatically managed and helps quite a lot of tooling. This contains Ansible to YANG Suite, pyATS over NETCONF, RESTCONF, gNxI, and even with legacy CLIs. With the addition of the brand new Cisco IOS XE Terraform supplier, we add a further device into the IOS XE configuration administration toolbox.

IOS XEWithin the programmability lifecycle, we handle system onboarding, configuration, monitoring and optimization. In Day 0, now we have system onboarding together with Pre-boot Execution Setting (iPXE), Zero Contact Provisioning (ZTP), and VM automation. In Day 1, we configure gadgets utilizing Community Configuration Protocol (NETCONF), RESTCONF, gNMI, YANG Knowledge Fashions, OpenConfig, YANG Suite tooling, Ansible, pyATS, and now Terraform. In Day 2, we monitor gadgets utilizing the TIG MDT container, YANG on-change help, gRPC dial-out with DNS and mutual TLS, and gNMI or NETCONF dial-in. Past Day 2, we optimize our gadgets utilizing gNOI cert/os/reset.proto, Visitor Shell with NETCONF, CentOS 8 with Python 3, Utility Internet hosting with Docker, and CLI to YANG. These options and protocols knit programmability into Cisco IOS XE.

Introducing Terraform with IOS XE

Why Terraform? Terraform simplifies advanced community configurations by orchestrating provisioning, configuration and state administration within the cloud in addition to on-prem within the campus enterprise community and the info middle.

Why Terraform within the Campus? Terraform is a perfect resolution for cloud-native clients, particularly these already utilizing this tooling in different elements of their community to consolidate cloud-native provisioning with on-prem system configuration. Moreover, we are able to now use Terraform for different cloud providers and infrastructure in addition to use it with present steady integration/steady deployment (CI/CD) tooling and pipelines.

Terraform is an Infrastructure as Code tooling that enables community operators to simply view operational knowledge, configure gadgets and handle community sources​. Since Terraform is cloud native, it really works effectively with Cisco IOS XE cloud native options for routing, switching, and wi-fi platforms together with the Cisco Catalyst 9000 Household switches, the Cisco Catalyst 8000V (digital) router and the Cisco Wi-fi LAN Controller (WLC) 9800-CL (CL stands for “Cloud”). In addition to simply managing cloud-native options, Terraform may also configure campus options. With Cisco IOS XE, we are able to automate with any tooling on any interface.

Safe Department Connectivity

IOS XEThe connection between Cisco and Terraform continues to develop. Cisco just lately launched Terraform help for Utility Centric Infrastructure (ACI). We are able to Leverage Cisco Intersight Service for HashiCorp Terraform. Additional, we are able to now combine Terraform configurations with DevOps pipelines to handle the IOS XE options in a extra versatile, constant, and dependable manner.

Terraform, a cloud native tooling, can be utilized natively by all cloud suppliers corresponding to Google Cloud Platform, Microsoft Azure, and AWS. For instance, we are able to use Terraform to configure an IPsec crypto tunnel between a Cisco Catalyst 9300X and an AWS Digital Personal Cloud (VPC). We are able to additionally provision extra sources throughout the cloud and configure extra options on our Catalyst 9300X all on the identical time.

Terraform Terminology

  • An execution plan file defines the supplier and sources. It’s written in HashiCorp Configuration Language (HCL), just like JSON, and saved with a .tf extension.
  • A supplier is a plugin to make a set of sources accessible.
  • A useful resource (or infrastructure useful resource) describes a number of infrastructure objects managed by Terraform. With the IOS XE Terraform supplier, sources might be thought of the identical as a configurable characteristic.


Utilizing the IOS XE Terraform Supplier

  1. Allow RESTCONF on the system to arrange it to be used with Terraform. The Terraform supplier was constructed by abstracting RESTCONF & YANG into HashiCorp Configuration Language (HCL) to be simply used as a REST API. Subsequently, RESTCONF is a prerequisite.
Gadget# conf t
Gadget(config)# restconf
  1. Set up Terraform.
$ apt-get set up terraform
  1. Clone the IOS XE Terraform Supplier GitHub repository.
$ git clone git@github.com:CiscoDevNet/terraform-provider-iosxe.git

Terraform execution plan recordsdata are written in HCL, which is similar to JSON. For every useful resource, a JSON mapping reformats the characteristic from CLI to JSON.

Discover examples of JSON mappings and options configuration utilizing the Cisco IOS XE Terraform supplier on GitHub together with options so as to add safety, redundancy, and customary protocols to your community.

Utilizing a characteristic exterior of those listed within the examples on GitHub? Concern not! All options supported by the REST API (extra particularly RESTCONF & YANG) can be prolonged and managed with Terraform by following these steps. This lets you configure options utilizing the IOS XE Terraform supplier.

VLAN Administration with Terraform

On this VLAN instance, we begin with no VLAN 511 configured on our Cisco IOS XE system. We discover the terraform.tf file, which has a useful resource to configure VLAN 511. We initialize terraform after which apply the modifications to our system.

Inside the Terraform execution plan file, now we have a useful resource to configure VLAN 511 on a Cisco IOS XE system:


With useful resource within the Terraform execution plan file, we are able to now initialize Terraform utilizing “terraform init”. After efficiently initializing Terraform, we are able to deploy the modifications within the Terraform execution plan file to the system utilizing “terraform apply -auto-approve.”


Now, now we have VLAN 511 efficiently configured on our IOS XE system! Take a look at the complete tutorial to configure a VLAN and different step-by-step tutorials displaying the right way to use the IOS XE Terraform supplier.

The place to go from right here

Terraform expands the Cisco IOS XE ecosystem to permit us to simply handle our community each within the cloud and on-prem. From configuring an IPsec tunnel between the general public cloud and an IOS XE system, to enabling and configuring VMs, to provisioning utilizing Cisco vManage and Cisco DNA Heart, Terraform has your again. With Terraform coming into the Cisco IOS XE realm, the chances are countless.

Able to get began? Achieve hands-on expertise with Terraform by way of the Cisco DevNet sandbox and studying labs.






Please enter your comment!
Please enter your name here

Most Popular

Recent Comments