The new versions of Terraform do not contain all plugins after the application installation. When you try to access a provider the first time, Terraform may not be able to communicate with it.
* provider.aws: no suitable version installed
version requirements: “(any version)”
versions installed: none
To download the necessary plugins, initialize the Terraform script directory
terraform init
The command will instruct Terraform to get all referenced modules and download all necessary plugins.
terraform plan
Plugin reinitialization required. Please run “terraform init”.
Reason: Could not satisfy plugin requirements.
Plugins are external binaries that Terraform uses to access and manipulate
resources. The configuration provided requires plugins which can’t be located,
don’t satisfy the version constraints, or are otherwise incompatible.
1 error(s) occurred:
* provider.aws: no suitable version installed
version requirements: “(any version)”
versions installed: none
Terraform automatically discovers provider requirements from your
configuration, including providers used in child modules. To see the
requirements and constraints from each module, run “terraform providers”.
Error: error satisfying plugin requirements
———————-
Resolution :
terraform –version
Terraform v0.11.11
+ provider.aws v1.56.0
terraform init
Initializing provider plugins…
– Checking for available provider plugins on https://releases.hashicorp.com…
– Downloading plugin for provider “aws” (1.56.0)…
The following providers do not have any version constraints in configuration,
so the latest version was installed.
To prevent automatic upgrades to new major versions that may contain breaking
changes, it is recommended to add version = “…” constraints to the
corresponding provider blocks in configuration, with the constraint strings
suggested below.
* provider.aws: version = “~> 1.56”
Terraform has been successfully initialized!
You may now begin working with Terraform. Try running “terraform plan” to see
any changes that are required for your infrastructure. All Terraform commands
should now work.
If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.