-
Notifications
You must be signed in to change notification settings - Fork 0
PLT-212 New workflows for tofu fmt, plan, and apply #320
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
| workflows: ["tofu-format-and-validate"] | ||
| types: | ||
| - completed | ||
|
|
There was a problem hiding this comment.
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.
.github/workflows/tofu-checks.yml
Outdated
| steps: | ||
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | ||
| with: | ||
| fetch-depth: 0 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
🎫 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.