Deploy an Entire AWS EKS Cluster — From Your Phone

1. Introduction — The One-Tap Infrastructure Promise

Imagine you’re on holiday, sipping coffee, and your team needs a fresh Amazon EKS cluster for a demo happening in two hours. You pull out your phone, open the GitHub mobile app, tap “Run workflow”, and go back to your coffee. Ten minutes later the cluster is live, fully configured, and ready for deployments.

This isn’t science fiction — it’s the reality of combining GitHub Actions (CI/CD) with HashiCorp Terraform (Infrastructure as Code). In this blog we’ll dissect a real-world workflow that provisions an AWS EKS cluster and show exactly how it works, step by step.

2. The Old World: Why Manual Provisioning Is Painful

Before automation, spinning up infrastructure looked something like this:

AspectManual (Old Way)Automated (GitHub Actions)
Access RequiredVPN + Laptop + AWS Console credentialsSmartphone with GitHub app
Time to Deploy30–90 minutes of clicking through UIs~10 minutes, fully hands-off
ConsistencyProne to human error & config driftIdentical every time (IaC)
Audit TrailWho did what? Check CloudTrail…maybeFull git history + workflow run logs
RollbackPainful reverse-engineeringterraform destroy or git revert
CollaborationTribal knowledge & runbooksSelf-documenting YAML + PR reviews

The manual approach doesn’t scale, introduces risk, and chains engineers to their desks. Automation flips every one of these pain points.

3. The Solution: GitHub Actions + Terraform

What is GitHub Actions?

GitHub Actions is a CI/CD platform built directly into GitHub. You define workflows as YAML files inside .github/workflows/. Each workflow consists of jobs made up of steps that run on GitHub-hosted (or self-hosted) runners. Workflows can be triggered by pushes, pull requests, schedules, or — crucially — manually via workflow_dispatch.

What is Terraform?

Terraform by HashiCorp is an Infrastructure as Code (IaC) tool. You describe your desired state in .tf files, and Terraform figures out how to create, modify, or destroy resources to match. Combined with version control, every infrastructure change is tracked, reviewable, and repeatable.

Why They’re Better Together

GitHub Actions provides the execution engine — a secure, ephemeral runner that checks out your code and runs commands. Terraform provides the declarative blueprint. Together, they turn a button press into a fully provisioned cloud environment.

4. Walkthrough: The EKS Terraform Apply Workflow

Let’s examine a real workflow file that lives in our repository. Below is the complete EKS_terraform_apply.yml with a detailed breakdown of every section.

Detailed Step-by-Step Breakdown

Step 1:

Trigger — workflow_dispatch

The on: workflow_dispatch declaration makes this workflow available for manual triggering. In the GitHub UI (desktop or mobile), a “Run workflow” button appears on the Actions tab. One tap is all it takes. You can optionally add inputs: to let users pick a branch, environment, or custom parameters.

Step 2:

Permissions — OIDC Token

id-token: write grants the workflow permission to request an OpenID Connect (OIDC) token from GitHub. This is essential for passwordless authentication to AWS — no static access keys stored anywhere.

Step 3:

Pre-check Job — check_changed_files

A lightweight gating job that can be extended to check whether relevant Terraform files have actually changed. It outputs run=true so the downstream terraform job only executes when appropriate. This pattern prevents unnecessary (and costly) cluster provisioning when nothing meaningful changed.

Step 4:

AWS Credential Configuration (OIDC)

The aws-actions/configure-aws-credentials@v4 action exchanges the GitHub OIDC token for temporary AWS STS credentials. The IAM role ARN is stored in secrets.AWS_OIDC_ROLE_ARN — encrypted, never exposed in logs, and scoped to the exact permissions Terraform needs. Zero long-lived secrets.

Step 5:

Terraform Setup

hashicorp/setup-terraform@v3 installs the exact Terraform version (v1.8.0) on the runner. Pinning the version ensures reproducibility: every run uses the same binary, avoiding surprises from version drift.

Step 6:

Terraform Init & Validate

terraform init downloads providers (e.g., AWS, Kubernetes) and initialises the backend (state storage). Flags like -reconfigure and -upgrade ensure a clean start every time. terraform validate confirms the HCL syntax is correct before doing anything expensive.

Step 7:

Terraform Plan

terraform plan -out=tfplan generates an execution plan — a precise diff of what will be created, modified, or destroyed. By saving it to a file, the subsequent apply is guaranteed to execute exactly what was planned, preventing any race conditions from external changes.

Step 8:

Terraform Apply

terraform apply -auto-approve tfplan provisions the resources. The -auto-approve flag skips the interactive confirmation prompt — safe here because we’re applying the exact saved plan. continue-on-error: true ensures the workflow reports success/failure without crashing the entire pipeline, allowing for downstream notifications or cleanup.

5. Triggering From Your Smartphone

Here’s what the experience looks like on the GitHub mobile app

Step-by-Step Mobile Experience

1

Open GitHub Mobile App

Navigate to your repository — Terraform-Code.

2

Go to the Actions Tab

Tap the Actions tab. You’ll see all available workflows listed.

3

Select “AWS EKS Apply”

Since it uses workflow_dispatch, a green “Run workflow” button is visible.

4

Choose Branch & Tap Run

Pick main (or any branch), tap the button, and the pipeline starts immediately.

5

Watch Progress in Real-Time

Each step shows a live status indicator. You get a push notification when it completes.

6

Done — Cluster Is Live!

Your EKS cluster is now provisioned and ready. All from your phone. Total human effort: ~3 taps.

6. Security: OIDC & Environment Protection

“But wait — isn’t it dangerous to let anyone trigger production infrastructure from a phone?” Great question. This workflow uses multiple layers of security:

7. Key Benefits at a Glance

8. Beyond EKS — Extending the Pattern

The beauty of this approach is its reusability. The same workflow_dispatch + Terraform pattern can be applied to any cloud resource:

  • VPN/IPSec Tunnels — Provision site-to-site connectivity on demand
  • Lambda Functions — Deploy serverless functions with proper IAM roles
  • Backup Vaults — Create and configure AWS Backup vaults and policies
  • OCI Resources — Provision Oracle Cloud Infrastructure (OKE clusters, JFrog setups)
  • Database Clusters — Spin up RDS/Aurora or managed PostgreSQL instances
  • Multi-Cloud — Terraform supports AWS, Azure, GCP, OCI, and 3000+ providers

Each workflow follows the same pattern:

You can even add dropdown inputs so the person triggering the workflow from their phone can choose the environment (staging vs. production), the AWS region, or any custom parameter — all from a simple mobile-friendly form.

9. Conclusion

The combination of GitHub Actions and Terraform fundamentally transforms how we think about infrastructure management. What used to require a full workstation, VPN access, and deep AWS console knowledge can now be accomplished with a single tap on your smartphone.

The workflow_dispatch trigger is the key enabler — it surfaces your entire infrastructure automation as a simple, mobile-friendly “Run” button. Combine it with OIDC for security, protected environments for governance, and Terraform for repeatability, and you have an enterprise-grade deployment system that fits in your pocket.

🚀 Start Today

Add on: workflow_dispatch to any existing GitHub Actions workflow. That single line is all it takes to unlock mobile-triggered deployments. Then layer on environment protections, OIDC authentication, and Terraform for a complete infrastructure-as-code pipeline you can trigger from anywhere in the world.

Looking to streamline your cloud infrastructure deployments even further?

About Winfo

Winfo is a global IT solutions company. As a key Oracle partner we provide implementation and support services for Oracle Fusion and E-Business Suite customers. To address a gap in the market we have also developed a number of Accelerators to help clients automate business processes, streamline their testing of patches and updates and developed a data mining accelerator to help get the most out of their ERP data.

Don’t miss out on these Insights!

Here are some other articles you might be interested in

What do you think?
Leave a Reply

Your email address will not be published. Required fields are marked *

From our blog

Articles & insights

Agentic Cloud Operations: What AI Agents Should and Shouldn’t Do. Learn where autonomous agents add value, where human oversight is essential, and how to govern
Oracle Fusion AP automation uses AI agents to streamline invoice processing, improve cash visibility, strengthen controls, and reduce AP costs.
Modernize compensation planning with Oracle Workforce Compensation to improve budget control, governance, visibility, approvals, and fair rewards.