terraform get doesn't update properly

Created on 3 Aug 2017  ยท  3Comments  ยท  Source: hashicorp/terraform

When an update to the remote module was done, a simple terraform get did not update the local modules. The subsequent terraform apply still returned in error. It was only until an rm -fr .terraform was performed, followed by a terraform get resolved the issue.

Terraform Version

Run terraform -v to show the version. If you are not running the latest version of Terraform, please upgrade because your issue may have already been fixed.

Terraform v0.9.11

Debug Output

Link to the gist is here:
https://gist.github.com/bernadinm/9366404e47d89bd776124877927eb10c

Expected Behavior

Terraform should have picked up the changes when the terraform get has been applied or potentially when a terraform apply was performed if it references a remote module/source

Actual Behavior

The user actually had to perform rm -fr .terraform in order for the new changes to take affect.

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. Reference a source module.
  2. Place a logic that no longer exist in the old source but exist in the updated sourced module
  3. Perform terraform get then terraform apply and observe failure.
core question waiting-response

Most helpful comment

Are you passing -update=true? terraform get by itself won't touch any pre-existing modules as mentioned in the docs.

All 3 comments

Are you passing -update=true? terraform get by itself won't touch any pre-existing modules as mentioned in the docs.

Yes, after rereading this, this was most likely the issue. I assumed terraform get will automatically update the local directories. Thanks @tomelliff! Marking ticket as closed.

I'm going to lock this issue because it has been closed for _30 days_ โณ. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

Was this page helpful?
0 / 5 - 0 ratings