Hi!!
I’m working with different modules in my terraform repository and I want to pre-install in a folder and used it locally:
But I try to init my plugin folder with the following command and never find the modules:
terraform init -plugin-dir ./terraform-plugins
...
...
Initializing the backend...
2022-02-28T16:39:18.639+0100 [DEBUG] New state was assigned lineage "182fcd76-13c9-fce4-25f8-4e31fc6afd98"
2022-02-28T16:39:18.639+0100 [DEBUG] checking for provisioner in "./terraform-plugins"
2022-02-28T16:39:18.639+0100 [DEBUG] init: overriding provider plugin search paths
2022-02-28T16:39:18.639+0100 [DEBUG] will search for provider plugins in [./terraform-plugins]
Initializing provider plugins...
- Finding latest version of hashicorp/aws...
╷
│ Error: Failed to query available provider packages
│
│ Could not retrieve the list of available versions for provider hashicorp/aws: provider registry.terraform.io/hashicorp/aws was not found in any of
│ the search locations
│
│ - ./terraform-plugins
Inside the folder I have the following providers, are the same but with different names, because I’m not sure what is the reason to don’t find the provider by terraform.
tree
.
├── main.tf
└── terraform-plugins
├── terraform-provider-aws
└── terraform-provider-aws_v4.1.0
I using terraform 0.15.3
Can someone help me to define the structure to automatically find by terraform the plugins?
Thank you!