Configuring Apstra Through HashiCorp™ Terraform™ Solution Brief

Automate data center configuration and documentation in multivendor data center network fabrics

Download Solution Brief


While configuring a data center fabric with the Apstra UI is simple, configuring multiple data centers can become time consuming. Also, documenting the initial configurations with any GUI is tedious, as well as updating adds, moves, and changes.



With the Apstra Terraform provider, along with Terraform, users can automate the configuration of Apstra and provide documentation at the same time using an infrastructure- as-code methodology. Terraform is commonly used for multicloud infrastructure, and when used with Apstra, operations can follow the same tooling pattern across multivendor data center fabrics.



- Day 0–Day 2+ provisioning automation
- Reliable and executable documentation that can easily be source version controlled
- Enable GitOps, infrastructure as code, and continuous integration/continuous delivery (CI/CD)
- Matches cloud site reliability engineering


The Challenge

Configuring and documenting data center networks is a challenging task, especially when configuring multiple data centers. One major challenge is the complexity of the network itself. Data center networks are usually large and intricate, with multiple layers and components. Configuration can involve a significant amount of manual work, including setting up devices, configuring interfaces, routing protocols, security policies, and more. Even with the intent-based workflows and multivendor abstractions that Juniper® Apstra provides, automating the provisioning process is key to ensuring both reliability and speed.

Another challenge is keeping accurate and up-to-date documentation. In a data center environment, network documentation is crucial to ensure the network remains stable and secure. However, keeping the documentation up to date can be time consuming when done manually, especially in large or multiple data centers. Any adds, moves, and changes to hardware or applications require updates to the documentation. Failing to keep documentation accurate and up to date can lead to network degradations, downtime, security breaches, and other issues, making it essential to have effective processes in place to manage documentation.


Apstra Terraform Provider

Juniper Apstra intent-based networking software automates and validates the design, deployment, and operation of data center networks, from Day 0 through Day 2+ and from multiple switching vendors such as Juniper, Cisco, Dell, and Arista. The only solution of its kind with multivendor support, Apstra empowers organizations to automate and manage their networks across virtually any data center location, vendor, and topology. Validated templates and zero-touch provisioning ensure reliable data center operations and reduce deployment times.

Terraform, on the other hand, is a tool for building, changing, and versioning infrastructure safely and efficiently. By using Terraform with Juniper Apstra, network engineers can automate network provisioning and avoid the tedious process of manually configurating and documenting multiple data centers.

To automate and streamline network provisioning, Juniper has built a Terraform provider for Apstra. The Terraform provider allows users to take advantage of common Terraform Hashi Configuration Language to configure Apstra. First, the network documentation is created in Terraform in a text format. Next, without any work from IT or engineering, the Apstra Terraform provider uses the Apstra Go SDK APIs to push the configuration to the data center devices through Apstra.

Figure 1: Terraform and Apstra streamline and automate data center configuration.

Figure 1: Terraform and Apstra streamline and automate data center configuration.

Any future changes are made in the Terraform configuration file (documentation) and pushed to Apstra as well. With its intent-based networking features, Apstra automates data center operations continuously, reducing complexity.

In addition to ensuring reliability, this methodology saves significant time when configurations and changes are made across multiple data centers.


Features and Benefits

  • Multivendor support: Juniper Apstra enables network engineers to automate network services across multiple vendors using a single platform.
  • Automated network provisioning: Terraform enables network engineers to automate the creation of network services, reducing the risk of human error and improving efficiency.
  • Declarative configuration: Terraform uses a declarative syntax to define infrastructure resources, making it easy to understand and modify network configurations while keeping documentation up to date.
  • Intent-based analytics: Juniper Apstra provides intent- based analytics to monitor network performance and adjust configurations accordingly, improving network reliability and performance.


Solution Components

  • HCL File: configuration code in HashiCorp Configuration Language
  • Terraform
  • Apstra Terraform provider (manages interactions with the Apstra API)
  • Apstra Go SDK (Apstra API)
  • Apstra


Summary–Automate Apstra Configuration and Documentation

Using the Apstra Terraform provider, network engineers can automate data center network documentation and configuration, reducing the risk of human error and improving network efficiency. Terraform’s declarative syntax makes it a versatile platform for network automation similar to cloud infrastructure, and in a sense—cloudifying the network.

Combining Terraform with the Juniper Apstra intent-based workflows and multivendor support provides the basis for network automation on top of higher-order abstractions, instead of automation at the low level of the network operating systems. By simplifying network operations, Terraform and Apstra accelerate the delivery of new services, and organizations gain a data center solution modeled after the simplicity and agility of the cloud.


Next Steps

To learn more about the Apstra Terraform provider and to download the provider, please visit You will also find additional information on at


About Juniper Networks

At Juniper Networks, we are dedicated to dramatically simplifying network operations and driving superior experiences for end users. Our solutions deliver industry-leading insight, automation, security and AI to drive real business results. We believe that powering connections will bring us closer together while empowering us all to solve the world’s greatest challenges of well-being, sustainability and equality.


3510797 - 003 - EN OCTOBER 2023