2. Apply with approval
What you will try
Create an approval-gated security group in the lab VPC. You can run this scenario right after setup; the direct lab is not a prerequisite. Compared with direct apply, this scenario adds an HTML Plan Review and waits for your decision in Argo before creating the resource. It does not use OPA.
1. Check EKS and the workflow
Complete Prepare EKS for the labs. In the eks-lab working directory with the rendered files, check the context and read the manifest before submitting it.
kubectl config current-context
kubectl -n argo-workflows get workflowtemplate iacstack-manual-aws-sg
cat rendered/manual-stack.yaml
In manual-stack.yaml, spec.workflowRef.name: manual-aws-sg selects the alias registered in controller-values.yaml. In spec.sourceRef, tag v4.13.0 identifies the community terraform-aws-modules/security-group/aws module. HashiCorp maintains the hashicorp/aws provider. The runner resolves the upstream revision and uses the mounted Terraform root in terraform/security-group/main.tf to pass the VPC ID from spec.inputs.vpc_id to the module and pin the module version.
Where is this scenario’s pipeline?
Request: manual-stack.yaml · Alias registration: controller-values.yaml · Full pipeline: manual.yaml.
Open the WorkflowTemplate iacstack-manual-aws-sg. The flow is Validate → Plan → Manual-Approval → Apply. When the plan has changes, manual-approval opens the form. The reviewer checks the plan and chooses Approve or Reject. There is no OPA in this scenario. Execution authorization happens after approval and ties Apply to the reviewed plan.
2. Submit the request
kubectl apply --dry-run=server -f rendered/manual-stack.yaml
kubectl apply -f rendered/manual-stack.yaml
kubectl -n platform-system get iacstack manual-approval-security-group -w
When the attempt appears, stop watching with Ctrl+C. Copy the name returned below and open that workflow in the Argo list.
STACK=manual-approval-security-group
WF=$(kubectl -n platform-system get iacstack "$STACK" -o jsonpath='{.status.execution.workflow}')
kubectl -n argo-workflows get workflow "$WF"
3. Read the plan in Argo
In the graph, open Terraform-Plan → Artifacts → plan-review and check the proposed creation. Open Logs → main on the same node for the full diff. Use the Manual-Approval form to make your decision after reviewing the plan.
The image below shows the full Plan Review rendered from the original HTML of an earlier EKS lab run. Use the steps in this guide for the current approval flow.
4. Reject the first plan
Wait for Manual-Approval to pause. Before choosing a decision, query AWS from the shell you used for setup. Expect []. If the group already exists, stop and check the account, VPC and previous lab runs.
bash lab-aws.sh ec2 describe-security-groups \
--filters "Name=vpc-id,Values=$(cat rendered/vpc-id)" "Name=group-name,Values=iacstack-lab-manual-sg" \
--query 'SecurityGroups[].[GroupId,GroupName]' --output json
Open Manual-Approval → Resume, choose Reject and confirm. Wait for the Workflow to finish. Check that the stack reports Blocked with reason ApprovalRejected, Terraform-Apply was skipped, and AWS still returns [].
kubectl -n platform-system get iacstack "$STACK" -o json | jq '.status'
bash lab-aws.sh ec2 describe-security-groups \
--filters "Name=vpc-id,Values=$(cat rendered/vpc-id)" "Name=group-name,Values=iacstack-lab-manual-sg" \
--query 'SecurityGroups[].[GroupId,GroupName]' --output json
5. Change the form in the same EKS cluster
In rendered/workflows/steps/manual.yaml, find the iacstack-manual-aws-sg-steps document, then spec.templates → approval → input Change-Ticket. Change only its description, for example to Sandbox lab: enter a sample ticket such as CHG0001234. Keep the parameter name and approval rules unchanged. Apply the updated template:
kubectl apply --dry-run=server -k rendered &&
kubectl apply -k rendered
Only after the first attempt has ended in ApprovalRejected and AWS returned [], recreate the IaCStack to get a fresh attempt. This lab uses deletionPolicy: Retain; deleting this declaration doesn’t delete AWS resources. Keep the original stack name.
kubectl -n platform-system delete iacstack "$STACK" --wait=true &&
kubectl apply -f rendered/manual-stack.yaml
After the controller schedules the new attempt, run:
WF=$(kubectl -n platform-system get iacstack "$STACK" -o jsonpath='{.status.execution.workflow}')
kubectl -n argo-workflows get workflow "$WF"
Open this new Workflow in Argo, review its own Plan Review and full plan log, and check for your edited description under Manual-Approval → Resume.
6. Approve and verify the new plan
Choose Approve, enter a sample ticket such as CHG0001234 and a review comment, then confirm. The workflow validates the fields after resuming. Wait for it to finish and rerun the stack and AWS queries in step 4. Expect Verified and exactly one security group named iacstack-lab-manual-sg.
Copy the GroupId from the AWS result for the new group. If you want to check that exact resource, query it by ID:
read -r -p "Security group ID: " SG_ID
bash lab-aws.sh ec2 describe-security-groups --group-ids "$SG_ID" \
--query 'SecurityGroups[].[GroupId,GroupName,VpcId]' --output table
In the same YAML, follow the request and response: plan passes intent to the runner, where iacstack intent read reads it. authorize reports a rejection or requests authorization. apply claims authorization, applies the saved plan and invokes iacstack result. Argo publishes the global execution-result output, which the alias in controller-values.yaml maps for the controller to read. Changing the approval form didn’t need to change this contract.
Next: 3. Govern with OPA. To change labels, reports or the form, see Customize Argo Workflows. To change result reporting or use another runner, see the execution CLI reference. Clean up the lab.

