I might be being stupid here, or not following some guideline as I’ve largely learnt this at need during our move from manual building to automated building in GCP.
Essentially, I’m writing a load of modules which I then upload to bitbucket, and we have terraform fetch them and run them.
However, terraform doesn’t seem to ever bother updating a module it’s already fetched, even when it’s quite clear from the git status that it’s changed. Is this by design, or am I missing some step which I should include for when I’ve updated a module and it needs refreshing?
I know about
terraform get -update however this fetches all the modules, which generally means it takes awhile and it’s re-fetching modules which haven’t changed. I’ve tried various invocations of this command hoping I’d figure out a way to fetch just the module I know has updated but I haven’t yet managed this. Currently, I’m removing the directory manually, then re-running terraform init which pulls down the missing module however this feels rather clunky to me, and I’m surprised terraform doesn’t at least acknowledge that the git repo is newer than the local module?