šŸ”„Letā€™s Do DevOps: Updating Your TF and Action Dependencies on GitHub Repos with DependabotšŸ”„

Kyler Middleton
3 min readOct 21, 2024

--

Never let new module versions go unnoticed!

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

Iā€™ve moved to LetsDoDevOps.com, you can find the article here. This content has a paywall for 1 week, and then will be free starting at 10/29/24 9a CT. Feedback on the paywall model is welcome!

Hey all!

Recently I was asked to implement Dependabot for our Terraform/OpenTofu repos, and do we have a lot of them! As your terraform implementation matures, youā€™ll end up with lots of Repos that contain modules. These modules represent best practice deployments of all the resource types you need to manage in your environment.

Your Project repos will end up calling these Resource modules, and deploying them lots of times. This works great, and is very scalable, but it does lead to a problem ā€” youā€™ll create a new version of a Resource module, and itā€™s hard to tell exactly which other Project repos (or other Resource Repos, even) are calling your Resource Repo, and which should probably be updated since thereā€™s a new version.

Thatā€™s where Dependabot comes in ā€” it has a lot of other uses, for all types of software, but weā€™ll stay firmly focused on the ecosystem I know the best ā€” Terraform and OpenTofu (which I use as synonyms here and in all my articles).

Hereā€™s an example PR opened by Dependabot when it noticed a new version of AzureRM available on GitHub. No manual steps were taken to trigger the check, and proposed code was tested in all envs.

Youā€™ll also end up with lots of Actions files in your repos. GitHub has now developed some tools for centralizing the Actions files in a single repo, and calling them from each repo, but those tools are still pretty remedial, so Iā€™d bet you have sometimes hundreds of copies of Actions in your repos.

Keeping up with all the step definitions can be a pain, even if youā€™ve centralized most of your logic in other Action-focused Repos. Dependabot can help with that too!

Implementation is incredibly simple, and doesnā€™t require any special license.

Letā€™s Do DevOps

From here on out, all content will be published on Letā€™s Do DevOps. I want to give back to the community as much as Iā€™m able. Please subscribe there to avoid missing any content. Thanks all ā¤.

This content has a paywall for 1 week, and then will be free starting at 10/29/2024 9a CT.

You can find this article here: https://www.letsdodevops.com/p/lets-do-devops-updating-your-tf-and

--

--

Kyler Middleton
Kyler Middleton

Written by Kyler Middleton

DevNetSecOps, DevRel, cloud security chick. I will teach you, itā€™s unavoidable. She/Her šŸ³ļøā€šŸŒˆšŸ³ļøā€šŸŒˆ, INFJ-A, support the EFF!

No responses yet