Skip to main content

Introduction

This article covers using the Terraform Provider for ZEDEDA Cloud to manage clusters as code. It assumes familiarity with Terraform and with clusters in Edge Infrastructure Services. For a complete introduction to the Terraform provider, see ZEDEDA Terraform Provider.

Prerequisites

  • You have the SysManager or SysAdmin role in your enterprise. See Manage Roles.
  • The Terraform CLI is installed on your local system.
  • A ZEDEDA Cloud API token. To generate one, go to your user profile (select your name in the header) and select the API Tokens tab.
  • Nodes are onboarded to Edge Infrastructure Services and running an EVE-OS Kubevirt image. Clusters require Kubevirt-capable nodes.
  • A project exists to associate the cluster with.

Create a Cluster

Dependencies

Before creating the cluster resource, declare its dependencies. A zedcloud_edgenode_cluster resource requires:
  • A zedcloud_project resource (or data source) providing the project ID.
  • At least one zedcloud_edgenode resource per node in the cluster, each running the EVE-OS Kubevirt image.

Example configuration

The following is a minimum proof-of-concept configuration for a three-node cluster. Revise it to match your environment before use.
For the full zedcloud_edgenode_cluster schema including all required and optional parameters, see the Terraform Registry: ZEDEDA Cloud Node Cluster.

Replace a Node in a Cluster

To replace a node in the cluster, update the node ID reference in the zedcloud_edgenode_cluster resource to point to the new node, then apply the configuration. Original reference:
Updated reference:
Run terraform plan to preview the change, then terraform apply to apply it. Constraint: You cannot add a node to or remove a node from a cluster. You can only replace an existing node.

Delete a Cluster

To delete a cluster, remove the zedcloud_edgenode_cluster resource block from your Terraform configuration, then run terraform apply. Constraint: You cannot delete a cluster if any application instance, network instance, or volume instance is running on a node in the cluster. Remove those resources first.

Next Steps

ZEDEDA Terraform Provider

Full provider setup, authentication, and common commands.

Rename Terraform Objects

Safely rename Terraform-managed resources without triggering unintended deletions.

Terraform Registry: ZEDEDA Cloud Node Cluster

Full resource schema reference.