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 #187

Closed
johntdyer opened this issue Nov 9, 2017 · 5 comments
Closed

Update module command #187

johntdyer opened this issue Nov 9, 2017 · 5 comments
Labels

Comments

@johntdyer
Copy link

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 ?

@lkysow
Copy link
Collaborator

lkysow commented Nov 12, 2017

@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?

@anubhavmishra
Copy link
Collaborator

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!

@lkysow
Copy link
Collaborator

lkysow commented Nov 14, 2017

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 ?

@lkysow
Copy link
Collaborator

lkysow commented Nov 14, 2017

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.

@atlantisbot
Copy link

This issue was migrated to runatlantis/atlantis#41. Read about why here.

@hootsuite hootsuite locked and limited conversation to collaborators Mar 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants