Skip to content

PLT-212 New workflows for tofu fmt, plan, and apply#320

Merged
gsf merged 49 commits intomainfrom
PLT-212
Nov 21, 2025
Merged

PLT-212 New workflows for tofu fmt, plan, and apply#320
gsf merged 49 commits intomainfrom
PLT-212

Conversation

@christopher-maboh
Copy link
Contributor

@christopher-maboh christopher-maboh commented Sep 30, 2025

🎫 Ticket

https://jira.cms.gov/browse/PLT-212

🛠 Changes

CDAP tf workflows have been replaced by tofu fmt, tofu plan, and tofu apply workflows.

ℹ️ Context

This change errs on the side of running tofu apply more often since we should be running it daily to keep infra drift in check anyway. By doing so, we can run a job per application and environment, planning and applying tf for all services within each environment whenever there is a change to our terraform services.

🧪 Validation

See checks.

@christopher-maboh christopher-maboh requested a review from a team as a code owner September 30, 2025 16:28
workflows: ["tofu-format-and-validate"]
types:
- completed

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an interesting idea but I think it would end up triggering this workflow on every push that changes anything in the terraform directory. These workflows can instead run independently.

@juliareynolds-nava juliareynolds-nava requested a review from a team October 2, 2025 15:55
@gsf gsf changed the title PLT-212: CDAP workflow for tofu format and lint PLT-212 CDAP workflow for tofu format and lint Oct 3, 2025
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
fetch-depth: 0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why fetch-depth: 0 instead of 1? Does zero fetch everything?

Copy link
Member

@gsf gsf Nov 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've dropped the need for commit comparison in this file but see python-checks for a place where I leverage tj-actions/changed-files to run tests on changed directories only.

gsf
gsf previously approved these changes Nov 20, 2025
@gsf gsf changed the title PLT-212 CDAP workflow for tofu format and lint PLT-212 New workflows for tofu fmt, plan, and apply Nov 21, 2025
@gsf gsf merged commit 8874310 into main Nov 21, 2025
16 checks passed
@gsf gsf deleted the PLT-212 branch November 21, 2025 19:36
gsf added a commit that referenced this pull request Nov 25, 2025
## 🎫 Ticket

https://jira.cms.gov/browse/PLT-212

## 🛠 Changes

Updated slack step and added concurrency in tofu workflows.

## ℹ️ Context

These are small follow-ups on #320 to address errors seen in workflow
runs here:
https://github.com/CMSgov/cdap/actions/runs/19637506066/job/56231851306

## 🧪 Validation

I updated the trigger on the apply workflow temporarily to test in this
PR. See run to demonstrate these changes here:
https://github.com/CMSgov/cdap/actions/runs/19674308293
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants