-
Notifications
You must be signed in to change notification settings - Fork 9.7k
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
Terraform Init -get-plugins=false
does not fail as expect in 0.13.x and beyond.
#27092
Comments
I confirmed that Conceptually, in the context of the new installer, plugins are always "installed" -- something that the current docs don't clarify. I think from you raising this issue, you expect the You might also find writing a custom |
The use case is specifically for running Terraform from an airgapped environment where providers are already available within the build agent host on disk. In TF 0.12 using this flag, we can quickly fail and not request providers from the public registry since outbound traffic is blocked, and most importantly get a meaningful error message if the local cache is missing a desired provider. Overall this is more of a consistency problem as we migrate code/process from 0.12 and beyond (expecting similar results). |
@straubt1 Thanks for the clarification! After discussing with the core team, it seems like this behavior (specifying to only search certain directories/registries) should be covered by being explicit in |
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. |
Terraform Version
Terraform Configuration Files
Expected Behavior
When running
terraform init -get-plugins=false
on a clean directory (i.e. there is no.terraform
folder), it is expected that the command returns an error.Per the documentation:
Actual Behavior
In Terraform 0.12.29 this works as expected, however in Terraform 0.13.5 and 0.14.0, the plugins (i.e. "providers") are downloaded anyway, seemingly ignoring the flag.
0.12.29
0.13.5
0.14.0
Steps to Reproduce
Create a
main.tf
:Ensure
.terraform
folder is not present:Run init with the ignore plugins flag:
The text was updated successfully, but these errors were encountered: