🔥Let’s Do DevOps: Terraform GitHub Action Targeting from Web Console User Input

Kyler Middleton
2 min readSep 15, 2022

This blog series focuses on presenting complex DevOps projects as simple and approachable via plain language and lots of pictures. You can do it!

Hey all!

I’m helping a team migrate their automation from AWS CodeBuild into GitHub Actions, including Terraform automation. CodeBuild is relatively clunky, but it has something useful that is absolutely critical to this team — you can run a pipeline and target a specific version of your source code — a branch or tag.

Until recently GitHub Actions didn’t support this — they are strong proponents of GitOps, where pure git actions drive all automation, and user input isn’t gathered. However, that has changed!

You can set all sorts of inputs on your action, like.. um, how many octocats to build, and their eye color (?!)

Actions now support both workflow_dispatch (launching an action manually from the web console) and inputs, a way of gathering input from the user when launching an action. We can combine these to have highly dynamic Actions.

Let’s walk through my implementation of a Terraform validation and deploy Action that takes input on launch of:

  • Branch/tag target
  • Custom field: Environment and Region of AWS to target

I’ve Moved To Lets Do DevOps



Kyler Middleton

DevNetSecOps, DevRel, cloud security chick. I will teach you, it’s unavoidable. She/Her 🏳️‍🌈🏳️‍🌈, INFJ-A, support the EFF!