Skip to content

Terraform

Progress checklist

All infrastructure in this walkthrough — VPC, subnets, EKS
Elastic Kubernetes Service — AWS-managed Kubernetes control plane; you manage nodes and workloads, AWS runs the API server, etcd, and scheduler.
cluster, node groups, IAM
Identity and Access Management — the AWS service that controls permissions and roles for all resources.
roles — is created and destroyed with Terraform
Terraform — the infrastructure-as-code tool used to create and manage all AWS resources in this walkthrough.
. Nothing is created manually in the console (except one-off checks). Using Terraform means:

  • Every change is reviewed before it’s applied
  • The full environment can be torn down with one command (terraform destroy)
  • State tracks what’s been created so incremental updates are safe

The Terraform code lives in a separate repository (aws-eks-terraform). You’ll clone it in the Git step.

  1. Install Terraform. Required

    Use Terraform 1.5 or later. The walkthrough uses features from 1.5+.

    Install via Homebrew (HashiCorp tap)
    brew tap hashicorp/tap
    brew install hashicorp/tap/terraform

    To upgrade later:

    Terminal window
    brew upgrade hashicorp/tap/terraform
  2. Verify the installation.

    Terminal window
    terraform version

    Expected output:

    Terraform v1.x.x
    on linux_amd64

    The version must be 1.5 or higher. If you have an older version installed via a different method, uninstall it first.

  3. Create a workspace directory.

    Create a dedicated directory where you’ll clone and run Terraform. This keeps the walkthrough files separate from other projects.

    Terminal window
    mkdir -p ~/workspace
    cd ~/workspace

    You’ll clone the Terraform repo into this directory in the Git step.

  4. Understand the state setup.

Continue to kubectl to install the Kubernetes CLI.