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

Can there be an -update=true switch added to atlantis plan/apply? #2631

Closed
red8888 opened this issue Nov 1, 2022 · 3 comments
Closed

Can there be an -update=true switch added to atlantis plan/apply? #2631

red8888 opened this issue Nov 1, 2022 · 3 comments
Labels
feature New functionality/enhancement

Comments

@red8888
Copy link

red8888 commented Nov 1, 2022

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request. Searching for pre-existing feature requests helps us consolidate datapoints for identical requirements into a single place, thank you!
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment.

Describe the user story

Related to previous issue but my use case is different:

When testing changes to my modules I create a feature branch and reference it some places its used like this:

module "my_module" {
  // source                         = "git::ssh:/..../my_module?ref=1.2.3"
  source                         = "git::ssh:/..../my_module?ref=feature/fix-the-thing"

I then do applies via atlantis so everyone can see whats happening in the PR. When we are ready to release we create a git tag.

During testing I'll apply, update my branch, apply again. I can't do this with atlantis because it does not re-download my branch.

Describe the solution you'd like

I don't want atlantis to force update modules every time, just on an adhoc basis via a switch. I want to be able to run atlantis plan -force-update or some arg to tell it to download the module again. So when I push changes to my branch I can plan/apply in atlantis.

Describe the drawbacks of your solution

Requires code changes.

Describe alternatives you've considered

Not anything that doesn't negatively effect my dev workflow

@red8888 red8888 added the feature New functionality/enhancement label Nov 1, 2022
@jamengual
Copy link
Contributor

can't you use custom workflow with terraform init --reconfigure?

@nitrocode
Copy link
Member

I think you want a custom workflow which will run

terraform init -upgrade

Or you could even wipe the .terraform directory before each init

rm -rf .terraform/
terraform init -upgrade

@jficz
Copy link

jficz commented Jun 20, 2024

I would like to reopen/revisit this issue. Having more or less the same use case as OP, I see a clear separation of concerns between the module developer, repo developer and workflow owner, which can easily be managed by different roles for different purposes. Having a whole custom workflow just for this seems like an impractical overkill, especially if the workflow itself is complex already. A -force-update-like flag is much more sensible and scales better with this kind of use cases.

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

No branches or pull requests

4 participants