Is there a way to execute terraform apply on a schedule using tfaction? #1795
-
QuestionThank you for providing such a wonderful OSS. I would like to execute terraform apply at a specific time using Cron to modify the resources based on the time of day or to correct drifts. I'm considering a setup where GitHub Actions creates a PR to modify the appropriate resources, automatically merges it, and then applies the changes. However, is there a better approach using tfaction? Background of the questionbackground:
For these reasons, I’m considering executing terraform apply on a schedule. Example CodeNo response NoteNo response |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
tfaction doesn't provide a way to run Probably you are aware, but tfaction supports the drift detection instead.
I think this would work well. If you don't want to create prs, you can implement the workflow based on apply.yaml or schedule-detect-drifts.yaml. |
Beta Was this translation helpful? Give feedback.
tfaction doesn't provide a way to run
terraform apply
periodically.It's potentially dangerous, so we have no plan to support it.
Probably you are aware, but tfaction supports the drift detection instead.
I think this would work well.
If you don't want to create prs, you can implement the workflow based on apply.yaml or schedule-detect-drifts.yaml.
tfaction/terraform-apply isn't available because it requires a plan file in GitHub Artifacts, but you can still utilize other actions such as tfaction/setup.