Terraform for Arista EOS and CloudVision Studios
Automate Arista EOS switches with Terraform: aristanetworks/cvp provider, CloudVision Studios, configlet management, and EVPN fabric automation.
DevOps
Automate SONiC switches with Terraform: REST/gNMI, Azure-style fabric automation, and disaggregated network OS fleets.
SONiC (Software for Open Networking in the Cloud) is the open-source NOS born at Microsoft Azure, now in production at many hyperscalers and growing in enterprise. SONiC has no single "official" Terraform provider — most teams drive it via gNMI/RESTCONF using community providers or wrap config_db.json rendering with Terraform templates.
locals {
config_db = {
DEVICE_METADATA = {
localhost = {
hwsku = "Accton-AS7726-32X"
type = "LeafRouter"
bgp_asn = "65001"
}
}
INTERFACE = {
"Ethernet0|10.0.0.1/31" = {}
}
BGP_NEIGHBOR = {
"10.0.0.0" = {
asn = "65000"
local_asn = "65001"
rrclient = "false"
}
}
}
}
resource "local_file" "config_db" {
content = jsonencode(local.config_db)
filename = "${path.module}/out/${var.hostname}-config_db.json"
}resource "null_resource" "push" {
triggers = { hash = sha256(local_file.config_db.content) }
connection {
type = "ssh"
user = "admin"
host = var.switch_ip
private_key = file(var.ssh_key)
}
provisioner "file" {
source = local_file.config_db.filename
destination = "/tmp/config_db.json"
}
provisioner "remote-exec" {
inline = [
"sudo cp /tmp/config_db.json /etc/sonic/config_db.json",
"sudo config reload -y",
]
}
}For larger fleets, the community karimra/gnmic driver or vendor-specific gNMI providers expose SONiC paths declaratively. Check provider compatibility against your SONiC build.
config save after each successful apply — startup config persists separately.Automate Arista EOS switches with Terraform: aristanetworks/cvp provider, CloudVision Studios, configlet management, and EVPN fabric automation.
Automate Cisco IOS XE devices with Terraform: ciscodevnet/iosxe provider, RESTCONF/NETCONF, configuration drift management, and CI-driven changes.
Automate Cisco Nexus NX-OS data-center switches with Terraform: VXLAN EVPN, vPC, leaf-spine fabrics, and ACI-adjacent automation.
Automate Juniper Junos devices with Terraform: junipernetworks/junos provider, NETCONF, commit-confirmed workflows, and EVPN-VXLAN fabrics.