DEV Community

Discussion on: ⚡💾⚡ Storing your Terraform statefile as a Github workflow artifact with the terraform_state_artifact action !

Collapse
 
dennislwm profile image
dennislwm

Thanks for the article!

How do you handle the issue that your Terraform state file will be deleted, as "by default, the artifacts and log files generated by workflows are retained for 90 days before they are automatically deleted"?

Collapse
 
sturlabragason profile image
sturlabragason • Edited

That's an excellent point @dennislwm that, truth be told, I hadn't thought of.

Reading the log retention docs tells me I don't have a lot of options so my first thought would be to run whatever pipeline that uses the action on a cron schedule. I'd guess that most pipelines using this could handle that, likely being stateful.

I'll make sure to mention it in the action's footnotes, thanks!👍

Edit: I've added it to the readme! Thanks 🔥