This repository provides Terraform scripts to deploy an Amazon EKS cluster along with base infrastructure and platform-specific infrastructure.
The repository is organized into the following folders:
-
base_infra: Contains Terraform scripts for setting up the base infrastructure, including VPC, subnets, and security groups. -
platform_infra: Contains Terraform scripts for setting up the EKS cluster and nodes, as well as any additional resources required for your platform.
- Navigate to the
base_infrafolder:
cd base_infra- Initialize Terraform with backend configuration:
terraform init -backend-config="env/baseinfra.config"-
Review and modify the
base_infraconfiguration files as needed. -
Create an execution plan:
terraform plan- Apply the changes to create base infrastructure:
terraform apply- Navigate to the
platform_infrafolder:
cd platform_infra- Initialize Terraform with backend configuration:
terraform init -backend-config="env/platforminfra.config"-
Review and modify the
platform_infraconfiguration files as needed. -
Create an execution plan:
terraform plan- Apply the changes to create the EKS cluster and associated resources:
terraform applyTo tear down the infrastructure when no longer needed:
- Navigate to each folder and run:
terraform destroy-
Replace placeholders like
env/baseinfra.configandenv/platforminfra.configwith the actual paths to your backend configurations. -
Make sure to review and adjust security group rules, IAM policies, and configurations as needed.