EKS quickstart labs

Prepare an isolated EKS cluster and run three Terraform scenarios against AWS.

All hands-on labs

What you will try

Use an existing EKS cluster to try Terraform on AWS. Start with a direct security group apply, then see what approval and OPA add. Each scenario can run on its own.

1. Direct apply · 2. Manual approval · 3. OPA governance

1. Check the prerequisites

Use Bash, curl, the AWS CLI, kubectl, Helm, and jq. These labs create real resources that can incur charges. Use a sandbox account and keep the state until cleanup is complete.

2. Download and prepare the examples

Select your AWS-generated EKS context in kubectl and use the AWS sandbox session. From an empty directory, download the examples and enter the existing cluster and bucket names:

curl -fsSL "https://iacstack.io/examples/download-eks-lab.sh" -o download-eks-lab.sh && bash download-eks-lab.sh || exit 1
cd eks-lab
bash prepare.sh YOUR_CLUSTER_NAME YOUR_BUCKET_NAME || exit 1

The script verifies the context with AWS and creates rendered/. Review the context, account, VPC, and bucket it prints before continuing. Run lab commands from the eks-lab directory.

3. Prepare Argo and pod access

If Argo Workflows already watches argo-workflows, skip its installation:

helm upgrade --install argo-workflows argo-workflows \
  --repo https://argoproj.github.io/argo-helm --version 2.0.20 \
  --namespace argo-workflows --create-namespace --wait --timeout 5m

Install the example ServiceAccounts and Kubernetes permissions:

kubectl wait --for=condition=Established \
  crd/workflows.argoproj.io crd/workflowtemplates.argoproj.io \
  crd/workflowtaskresults.argoproj.io --timeout=120s
kubectl apply -f rendered/shared.yaml -f rendered/reviewer-rbac.yaml
kubectl -n argo-workflows create role iacstack-quickstart-results \
  --verb=create,patch --resource=workflowtaskresults.argoproj.io \
  --dry-run=client -o yaml | kubectl apply -f -

Create the IAM roles in the sandbox account, then use EKS Pod Identity to associate each role with the ServiceAccount listed below, in argo-workflows. Use the rendered policies as examples and fill in the trust relationship shown in pod-trust.json.

The alias in controller-values.yaml maps the stack request to a WorkflowTemplate (templateRef.name) and a ServiceAccount (serviceAccountName). Argo uses that account for the runner pod, which gets the IAM role’s permissions. The controller does not use those permissions.

LabServiceAccountExample policy
Direct and manualiacstack-aws-sgsg-permissions.json
OPAiacstack-opa-awsopa-permissions.json
To read HTML in manual and OPAThe Argo Server ServiceAccountreader-permissions.json

For the HTML reader, check the server ServiceAccount name with kubectl -n argo-workflows get deployment argo-workflows-server -o jsonpath="{.spec.template.spec.serviceAccountName}".

4. Install the controller and lab workflows

Use a dedicated installation: these values register the lab aliases and replace any existing alias list.

helm upgrade --install iacstack-controller oci://ghcr.io/iacstack/charts/iacstack-controller \
  --version 0.1.0-alpha.2 --namespace platform-system --create-namespace \
  --values rendered/controller-values.yaml --wait --timeout 4m
kubectl wait --for=condition=Established crd/iacstacks.iacstack.io --timeout=120s
kubectl apply --dry-run=server -k rendered &&
  kubectl apply -k rendered
kubectl -n argo-workflows get workflowtemplate \
  iacstack-direct-aws-sg iacstack-manual-aws-sg iacstack-governed-opa-aws

5. Open Argo

If you already have access to the Argo UI, reuse it. For a dedicated lab installation, set up token access and TLS:

helm upgrade argo-workflows argo-workflows --repo https://argoproj.github.io/argo-helm \
  --version 2.0.20 -n argo-workflows --reuse-values -f rendered/argo-values.yaml \
  --set server.secure=true --set 'server.authModes[0]=client' --wait
kubectl -n argo-workflows create token iacstack-reviewer --duration=1h
kubectl -n argo-workflows port-forward svc/argo-workflows-server 2746:2746

Open https://localhost:2746 with the short-lived token and select argo-workflows. For manual or OPA, if you just associated the report reader role with a running server, restart the Argo Server deployment before opening the reports.

1. Direct apply · 2. Manual approval · 3. OPA governance

Where to edit

The manual lab adds a pause and an HTML review. In the OPA lab, the Rego policy decides how to proceed. See How it works for how these pieces fit together.

Customize Argo · Troubleshoot a run · Clean up the lab