Posted at

Terraform init実行時にプラグインエラーが発生した場合の対処方法


  • OS: Amazon Linux 2 AMI (HVM), SSD Volume Type - ami-0a2de1c3b415889d2

  • Terraform: v0.11.11

Terraform init実行時にエラー

terraform initの実行時に以下のエラーが発生する場合は、プロバイダ用のプラグインがダウンロードできない場合に発生します。

$ terraform init -upgrade

Initializing provider plugins...
- Checking for available provider plugins on

Error installing provider "aws": Get proxyconnect tcp: tls: oversized record received with length 20527.

Terraform analyses the configuration and state and automatically downloads
plugins for the providers used. However, when attempting to download this
plugin an unexpected error occured.

This may be caused if for some reason Terraform is unable to reach the
plugin repository. The repository may be unreachable if access is blocked
by a firewall.

If automatic installation is not possible or desirable in your environment,
you may alternatively manually install plugins by downloading a suitable
distribution package and placing the plugin's executable file in the
following directory:



$ mkdir -p terraform.d/plugins/linux_amd64

$ cd terraform.d/plugins/linux_amd64/
$ wget
$ unzip

Terraform initを再度実行し、問題ないことを確認します。

$ terraform init -upgrade