This document provides a step-by-step guide for setting up the infrastructure required to self-host the DevZero Control Plane and Data Plane using Terraform. The infrastructure can be deployed on cloud platforms like AWS, GCP, and Azure.
For readers experienced with Terraform deployments at their companies, we have some examples under ./examples that you can reference to see how to run a full DevZero deployment. If you have your own terraform environment and want to reuse our modules, you can refer to the ./modules directory to use whichever components you need.
The terraform/ directory contains Infrastructure as Code (IaC) configurations that automate the provisioning of essential cloud resources such as VPCs, EKS clusters, load balancers, and VPNs.
- Terraform (for managing infrastructure as code)
- AWS CLI (for interacting with AWS resources)
- Access credentials for your cloud provider (AWS/GCP/Azure)
Ensure your IAM user or role has sufficient permissions to create resources like VPCs, subnets, EKS clusters, ALBs, and VPNs.
git clone https://github.com/devzero-inc/self-hosted.gitcd self-hosted/terraform/examples/aws/base-cluster- Open the
terraform.tfvarsfile. - Update the VPC ID and subnet IDs.
- Set
create_vpc = falseto prevent Terraform from creating a new VPC.
- Skip the above step.
- Ensure
create_vpc = true(default setting).
- Set
cluster_endpoint_public_access = trueto allow public access. - Set it to
falsefor private access.
terraform init
terraform apply- This will create AWS resources such as VPC, EKS, ALB, VPN, etc.
- Copy the output values like cluster name, VPC ID, and subnet IDs for the next steps.
cd ../cluster-extensions- Add the VPC ID, subnet IDs, region, and EKS cluster name from the previous step.
terraform init
terraform apply- This will create EKS Add-ons, Storage Classes, and EFS.
aws eks update-kubeconfig --region <region> --name <cluster-name>cd ../../../kata
kubectl apply -f runtimeclass.yamlRefer to the Charts README for further steps to deploy the Control Plane and Data Plane.
- Verify cloud credentials and permissions.
- Check Terraform state files for resource management.
- Use
terraform planto preview changes before applying.