Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get -update doesn't update from non-master branches #1568

Closed
clstokes opened this issue Apr 16, 2015 · 14 comments · Fixed by hashicorp/go-getter#4
Closed

get -update doesn't update from non-master branches #1568

clstokes opened this issue Apr 16, 2015 · 14 comments · Fixed by hashicorp/go-getter#4

Comments

@clstokes
Copy link
Contributor

I'm using git remote modules (hosted in a private repo on GitHub) and specifying a branch other than master. However, it seems when using a branch other than master, modules are not updated when I run get -update. If modules are pulled from master, then they're updated fine.

Using v0.4.2...

Steps to reproduce

  1. Create module module1 in repo repo-modules.
  2. Create project project1 in repo repo-main, that uses module1.
  3. In project1, run get and plan to see changes you expect.
  4. Create changes to module1 on branch branch1.
  5. Update your source URL to use branch1 with ?ref=branch1.
  6. In project1, run get -update and plan. Your should not see the changes you expect.

If it matters the source URL I'm using is in the form git::ssh://[email protected]/org/repo-modules.git//module1?ref=branch1.

Updated with Terraform version.

@radeksimko
Copy link
Member

I don't see this being problem in case of git tags used as versions as these will not likely ever be updated. In fact, you can't actually update a tag in any clean way, it's just a pointer to git hash which won't be pointing anywhere else unless you push --force such change (correct me if I'm wrong).

In case of real branches, it is an issue though.

@rradecki
Copy link

rradecki commented Jul 8, 2015

+1
We want also to use branches other than master and I think that this functionality should be implemented. When is it going to be done?

@ghost
Copy link

ghost commented Jul 17, 2015

+1

1 similar comment
@pmilewsk
Copy link

+1

@amaczuga
Copy link

please do fix this

@sszwed
Copy link

sszwed commented Jul 22, 2015

+1

@rradecki
Copy link

Is there any ETA for this issue?

@elblivion
Copy link
Contributor

+1

1 similar comment
@bennycornelissen
Copy link

+1

@djvdorp
Copy link

djvdorp commented Oct 23, 2015

+1 for this, the issue still exists in v0.6.6 when trying to use ?ref=branch1.

Workaround for an upgrade-like experience (clean and re-clone)

rm -rf .terraform/modules/
terraform get
terraform plan

djvdorp added a commit to djvdorp/terraform-aws-cf-install that referenced this issue Oct 24, 2015
@mitchellh
Copy link
Contributor

Working on this now

@mitchellh
Copy link
Contributor

Fix is in PR, will be fixed in the next release of TF

@djvdorp
Copy link

djvdorp commented Nov 23, 2015

@mitchellh great, thanks for your work, very much appreciated! When is the next release of TF scheduled?

@ghost
Copy link

ghost commented Apr 29, 2020

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.

@ghost ghost locked and limited conversation to collaborators Apr 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.