Configurable cache policy per job?
Proposal
By default, when we use cache on CI jobs, the default policy on is pull-push. Meaning that every job tries to pull from cache and at the end it uploads back to the cache. This could lead to unnecessary network round-trips on jobs that actually doesn't modify / need the cache, potentially slowing down the jobs and causing network costs.
We overcome this by running pull-push only in validate (that's where init is called first time), to have modules and providers downloaded. In later stages (plan, apply), we just use pull policy, so that nothing gets uploaded to buckets. In test stage, where we have IaC scanner, we disable the cache all together, as it's not needed.
I wonder if you would consider adding this as configurable parameter to component, so that we don't have to maintain our own fork? At the moment, we still use our version depracated Terraform CI/CD template and I guess nothing new will be added there. So the future seems to be OpenTofu, where we would like to have this configurable.
Thanks for your opinion on this!