-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
v0.21+: Override mirror URL for terraform downloads #2701
Comments
cc: @fblgit I did some research on how the current tf download url can be plumbed through if you have time to take a look, we'd really appreciate this. |
This is blocking us from updating since we run Atlantis in an environment where no internet-bound communication is allowed. Using the latest release, when I run a plan, Atlantis dies, after logging:
It doesn't log a line number/etc, so it took a while to track down where the error is coming from. It also strikes me that this shouldn't kill Atlantis. Pulling this listing may intermitently fail (as all internet bound traffic does). It would make more sense to catch this and report it back to whatever VCS Atlantis is interacting with. Finally, I'd like to request that, along with allowing someone to override the mirror URL, I would like to be able to disable the dynamic version fetching altogether. |
Agreed. Please feel free to propose a pr. This would be a good fix. cc @fblgit |
Was looking into this a little more. I noticed As for the error handling... that looks like a harder fix because terraform-switcher has embedded |
If you implemented your mirror the same way as hashicorp, then the tf switcher function wouldn't error out, no? Or do you have a use case that could be better proposed in the upstream library? I think we'd prefer not replicating logic here if the upstream library could do it. Thanks for diving into this! |
Community Note
Describe the user story
From comment #1776 (comment)
Describe the solution you'd like
Override the mirror URL to download terraform from airgapped environments using a flag such as
--tf-download-mirror-url
The tf download url is in the user config
atlantis/server/user_config.go
Line 10 in d4c7cce
atlantis/server/user_config.go
Line 97 in d4c7cce
atlantis/cmd/server.go
Line 146 in d4c7cce
And it just needs to be passed here
atlantis/server/events/project_command_context_builder.go
Line 19 in d4c7cce
Here is how the tf downloading works
atlantis/server/core/terraform/terraform_client.go
Lines 140 to 150 in d4c7cce
atlantis/server/core/terraform/terraform_client.go
Line 421 in d4c7cce
Describe the drawbacks of your solution
None
Describe alternatives you've considered
None
The text was updated successfully, but these errors were encountered: