Skip to content

Instantly share code, notes, and snippets.

@maplebed
Created March 15, 2016 19:01
Show Gist options
  • Select an option

  • Save maplebed/beb4502a1a27f175cc4c to your computer and use it in GitHub Desktop.

Select an option

Save maplebed/beb4502a1a27f175cc4c to your computer and use it in GitHub Desktop.
Using terraform v0.6.12
Steps to reproduce:
1) create a module in your local filesystem, use that module from within the root module
eg: module "foo" { source = "./foomod" }
2) run terraform get -update
3) confirm the cached module is a symlink: ls -l .terraform/modules/ should have a file that links to ./foomod
4) change the root module's invocation to point at a github repo instead (doesn't matter which one but it must exist)
eg module "foo" { source = "github.com/terraform-community-modules/tf_aws_sg" }
5) run terraform get -update
Observe:
* the terraform output includes "Get: git::https://github.com/terraform-community-modules/tf_aws_sg.git (update)"
* the exit code of the terraform get -update command is 0, indicating success
* run ls -l .terraform/modules/ and observe that the symlink to the local filesystem for module foomod still exists
* running 'terraform plan' continues to use the local filesystem version of foomod
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment