How To Use Terraform for Automation at the Edge

Automation is redefining how organizations deploy and manage secure workloads at the distributed edge. By leveraging flexible platforms with robust automation APIs, such as REST and Terraform, enterprises can orchestrate, automate and chain together essential network and security services across diverse sites. This includes everything from firewalls and SD-WANs to core business applications that require resilience and strong security.
Service chaining, powered by automated orchestration, enables organizations to dynamically deploy, interconnect and govern workloads at the edge. This approach minimizes manual intervention, accelerates deployment cycles and ensures consistent enforcement of security policies, no matter how distributed or complex the infrastructure. Automated workflows not only improve operational efficiency but also deliver the right security and application services exactly where and when they are needed.
In industries such as transportation, warehousing, retail, oil and gas and other critical infrastructures where airgap may be a requirement, these capabilities are driving innovation and enabling rapid deployment of security services, consistent life cycle management and streamlined operations at distributed edge locations. With automation as the foundation, enterprises gain the agility and resilience to stay ahead as business moves closer to the edge.
About the Demo
This demo showcases end-to-end automation for deploying security services, provisioning distributed workloads and managing their full life cycle with minimal manual intervention and complete visibility. The demonstration covers automated, policy-driven deployment of edge applications, firewalls and K3S clusters with zero-touch automation, as well as full-stack automation for the entire life cycle of all infrastructure components.
It illustrates how modern automation empowers rapid, secure and scalable distributed deployments, ultimately eliminating manual configuration for repeatable edge deployment and life cycle management processes.
Follow along with the demo (embedded below) to explore how you can use Terraform with an edge computing platform to simplify deployment and management of secure workloads at scale.
Setup Requirements
To execute this demo, the following technical prerequisites are necessary:
- Edge device running EVE-OS: An open source, Linux-based operating system (OS) for secure edge computing.
- ZEDEDA tenant account: Access to the ZEDEDA orchestration platform for managing devices and applications.
- Terraform and cloud-init: Tools for Infrastructure as Code (IaC) that enable fully automated provisioning and configuration.
- Access to a GitHub repository: Hosts the application manifests and configuration files for deployment.
- Rancher server: Manages K3S cluster life cycle and registration.
- Marketplace access: Availability of required images, including a firewall Virtual Network Function (VNF), such as Fortinet or Palo Alto Networks, and Ubuntu 24.
The demo setup involves logging into the ZEDEDA UI, selecting the edge device, deploying the firewall VNF and virtual machines (VMs) and orchestrating a K3S cluster with automated application deployment.
Key Capabilities in the Demo
This demonstration highlights several key features:
- Automated, policy-driven deployment: Terraform and cloud-init are used to centrally deploy and configure edge applications, firewalls and K3S clusters with zero-touch automation.
- Service chaining: Application traffic is automatically routed through a security VNF, demonstrating integrated security enforcement across distributed sites.
- Full-stack automation: The entire life cycle — deployment, configuration, bootstrapping and registration — of all infrastructure components (firewall, VMs, K3S cluster and apps) is fully automated.
- Centralized life cycle management: The platform provides unified monitoring and management of distributed resources.
- Continuous delivery with GitOps: Applications are deployed and updated automatically via integration with a GitHub repository, ensuring version control and auditability.
The demo showcases end-to-end automation for deploying security services, provisioning distributed workloads, and managing their full life cycle — all with minimal manual intervention and complete visibility.
How the Technology Works
The solution integrates several advanced technologies:
- ZEDEDA edge orchestration: Provides centralized management, device onboarding and policy-based automation for distributed edge workloads.
- IaC tools: Terraform and cloud-init automate resource provisioning, configuration and policy enforcement.
- Service chaining: Ensures all application traffic flows through the deployed firewall VNF, maintaining security at network boundaries.
- Rancher + K3S: Enables lightweight Kubernetes deployment and centralized cluster management.
- GitOps workflow: Uses GitHub for declarative application management, enabling consistent, auditable deployments.
Execution Steps
- Log in to ZEDEDA’s user interface (UI) to access the device dashboard.
- Use Terraform to automate the deployment of a firewall VNF and Ubuntu VMs across four different networks/zones.
- Deploy a K3S cluster and automatically register it with Rancher.
- Deploy applications on the K3S cluster via GitOps, pulling manifests from GitHub.
- Monitor and manage the entire distributed stack from the ZEDEDA platform.
- Test connectivity from respective applications and monitor firewall logs for activity.
This workflow eliminates manual configuration, delivering a scalable, secure, repeatable process for edge deployment and life cycle management.
Benefits of This Approach
This architecture’s benefits include:
- End-to-end automation of security services and distributed application deployment.
- Centralized visibility and life cycle control over all edge resources and workloads.
- Consistent, policy-driven enforcement and infrastructure management.
- Reduced operational overhead and fewer manual touchpoints.
Over time, organizations may realize:
- Scalability to manage large fleets of edge devices and workloads.
- Agility to deploy new security services or update existing applications.
- Stronger security posture through automated service chaining and policy enforcement.
- Lower total cost of ownership (TCO) by leveraging open platforms and automation.
Use Cases
This demo is relevant for a variety of security-focused and distributed edge computing scenarios, including:
- Retail: Secure point-of-sale and application deployments across store locations.
- Manufacturing: Automated deployment and life cycle management of security and operational workloads at factory edges.
- Critical infrastructure: Isolated network segmentation and automated deployment for utility or energy sites.
- Transportation: Security enforcement and distributed workload management for fleet operations, logistics hubs and autonomous or connected vehicles.
ZEDEDA and Terraform enable fully automated orchestration and service chaining at the distributed edge. This modern edge automation empowers rapid, secure and scalable distributed deployments at scale, reducing operational costs. Learn more about how to leverage ZEDEDA’s edge orchestration solution to automate your secure workloads at the edge.