Closed xddq closed 12 months ago
idea: maybe we can use .envrc to create alias from tf init
to tf init -upgrade
terraform init -upgrade
or terraform get -upgrade
is definitley required to read newest reversion from GitHub.envrc
) does not support aliases: https://github.com/direnv/direnv/issues/73 There are some hacky ways in the comments that are highly shell dependent and I would not recommend.Ideas:
alias tf init='terraform init -upgrade'
but that only works globally
echo "terraform init -update
exec terraform apply" > terraform-init.sh
chmod +x terraform-init.sh
./terraform-init.sh
thanks for looking into this, and investigating hacky wacky workarounds @e2b
I think for the time being, it's probably most feasible, that we use alias at our own discretion, it doesn't require any extra setup, other than our local shell config, personally I think setting up extra tooling is a bit much.
One thought we should extend the README for they-terraform and add a little note about the necessity of using terraform init -upgrade
, I don't think that's necessarily a command especially new people to tf would think of, what do you think?
closing this, as we discussed to reopen version releases for they-terraform, plus a mention in the readme about terraform init --upgrade
will be made.
Context
We currently don't use versioning which means that breaking changes in they-terraform are escalated to our applications using they-terraform modules and they can suddenly no longer work. On the other hand, this approach has the upside that we are forced to keep our dependencies up-to-date. Also, no version management is needed. E.g. we don't have to update the versions for all our code using they-terraform modules. A downside of this approach is that (currently) updates/new commits on they-terraform only get appliead if we remove the terraform module cache locally.
Desired Outcome