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

Update module command #41

Closed
atlantisbot opened this issue Mar 6, 2018 · 5 comments
Closed

Update module command #41

atlantisbot opened this issue Mar 6, 2018 · 5 comments

Comments

@atlantisbot
Copy link

Issue by @johntdyer
Thursday Nov 09, 2017 at 21:57 GMT
Migrated from hootsuite/atlantis#187
Why was it migrated?


Hey guys,

So atlantis plan appears to be doing a plan w/ an old version of one of our modules. I am wondering if there is any way to force atlantis to run terraform get -update=true before the plan ? Perhaps i am missing something fundamental ?

@atlantisbot
Copy link
Author

Comment by @lkysow
Sunday Nov 12, 2017 at 18:23 GMT


@johntdyer thanks for the issue. Yes I see that we're doing a vanilla terraform get instead of terraform get -update=true. @anubhavmishra any reason you see to not do the update true?

@atlantisbot
Copy link
Author

Comment by @anubhavmishra
Sunday Nov 12, 2017 at 18:50 GMT


yea, it was done so we don't force update modules without people knowing. We currently only run terraform init with the new versions of terraform that in turn downloads all the projects dependencies which includes the modules. I think there is an option in init to download the latest version of modules. I would like to think about this one. Currently @johntdyer, you can use your project config (atlantis.yaml) file and set the extra_arguments for init and pass -upgrade=true. Thanks for bringing this up!

@atlantisbot
Copy link
Author

Comment by @lkysow
Tuesday Nov 14, 2017 at 14:56 GMT


Here's what your config file would look like in your repo

# atlantis.yaml
extra_arguments:
- command_name: init
  arguments:
  - "-update=true"

Does this work for you @johntdyer ?

@atlantisbot
Copy link
Author

Comment by @lkysow
Tuesday Nov 14, 2017 at 15:00 GMT


FYI, we like to use ref={tag/commit} in our module source rather than pinning to master and having it auto-update (assuming you're using a git source). See https://www.terraform.io/docs/modules/sources.html#ref

ex.

module "consul" {
  source = "git::https://hashicorp.com/consul.git?ref=v0.1"
}

In this case, Atlantis will always get the right version of your modules.

@lkysow
Copy link
Member

lkysow commented Mar 15, 2018

Closing since there's a workaround unless someone else has this requirement?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants