Terraform挂起,没有输出

Terraform挂起,没有输出,terraform,Terraform,我在Windows7上运行TerraformV0.9.6版本。当我运行任何terraform命令时,我都会遇到以下问题: D:\terraforma>terraform destroy Do you really want to destroy? Terraform will delete all your managed infrastructure. There is no undo. Only 'yes' will be accepted to confirm. Ent

我在Windows7上运行TerraformV0.9.6版本。当我运行任何terraform命令时,我都会遇到以下问题:

D:\terraforma>terraform destroy
Do you really want to destroy?
  Terraform will delete all your managed infrastructure.
  There is no undo. Only 'yes' will be accepted to confirm.

  Enter a value: yes
在此之后数小时内没有输出。有人问我这里有什么问题吗?启用日志记录到我得到的调试级别

------------------------
2017/06/01 11:43:56 [DEBUG] plugin: terraform.exe: POST / HTTP/1.1
2017/06/01 11:43:56 [DEBUG] plugin: terraform.exe: Host: sts.amazonaws.com
2017/06/01 11:43:56 [DEBUG] plugin: terraform.exe: User-Agent: aws-sdk-go/1.8.25
 (go1.8; windows; amd64) APN/1.0 HashiCorp/1.0 Terraform/0.9.6
2017/06/01 11:43:56 [DEBUG] plugin: terraform.exe: Content-Length: 43
2017/06/01 11:43:56 [DEBUG] plugin: terraform.exe: Authorization: AWS4-HMAC-SHA2
56 Credential=AKIAJ2TUUX4QXSQBD6EA/20170601/us-east-1/sts/aws4_request, SignedHe
aders=content-length;content-type;host;x-amz-date, Signature=dfd1cf69c9c110726ef
be5cfe6aeff5c16437f599e33a5ce5943dd9e04035bb2
2017/06/01 11:43:56 [DEBUG] plugin: terraform.exe: Content-Type: application/x-w
ww-form-urlencoded; charset=utf-8
2017/06/01 11:43:56 [DEBUG] plugin: terraform.exe: X-Amz-Date: 20170601T061356Z
2017/06/01 11:43:56 [DEBUG] plugin: terraform.exe: Accept-Encoding: gzip
2017/06/01 11:43:56 [DEBUG] plugin: terraform.exe:
2017/06/01 11:43:56 [DEBUG] plugin: terraform.exe: Action=GetCallerIdentity&Vers
ion=2011-06-15
2017/06/01 11:43:56 [DEBUG] plugin: terraform.exe: -----------------------------
------------------------
2017/06/01 11:43:59 [DEBUG] dag/walk: vertex "data.aws_ami.ubuntu", waiting for:
 "provider.aws"
2017/06/01 11:43:59 [DEBUG] dag/walk: vertex "provider.aws (close)", waiting for
: "data.aws_ami.ubuntu"
2017/06/01 11:43:59 [DEBUG] dag/walk: vertex "root", waiting for: "provider.aws
(close)"
2017/06/01 11:44:04 [DEBUG] dag/walk: vertex "data.aws_ami.ubuntu", waiting for:
 "provider.aws"
2017/06/01 11:44:04 [DEBUG] dag/walk: vertex "provider.aws (close)", waiting for
: "data.aws_ami.ubuntu"
2017/06/01 11:44:04 [DEBUG] dag/walk: vertex "root", waiting for: "provider.aws
(close)"
2017/06/01 11:44:09 [DEBUG] dag/walk: vertex "provider.aws (close)", waiting for
: "data.aws_ami.ubuntu"
2017/06/01 11:44:09 [DEBUG] dag/walk: vertex "data.aws_ami.ubuntu", waiting for:
 "provider.aws"
2017/06/01 11:44:09 [DEBUG] dag/walk: vertex "root", waiting for: "provider.aws
(close)"
2017/06/01 11:44:14 [DEBUG] dag/walk: vertex "provider.aws (close)", waiting for
: "data.aws_ami.ubuntu"
2017/06/01 11:44:14 [DEBUG] dag/walk: vertex "data.aws_ami.ubuntu", waiting for:
 "provider.aws"
2017/06/01 11:44:14 [DEBUG] dag/walk: vertex "root", waiting for: "provider.aws
(close)"

这是terraform较旧版本的一个已知问题,如果AWS提供商进行一些背景检查并尝试连接到元数据ip 169.254.169.254:80,则terraform将永远挂起并循环,然后继续执行进一步的步骤

若要修复此问题,您可以添加一条规则以断开与
169.254.0.0/16的连接,该规则应该可以正常工作

建议您升级到最新的稳定版本0.9.8(发布日期:2017年6月7日)


版本发布变更日志:

从版本
0.9.6
升级到版本
0.10.6
为我解决了这个问题

您是否先运行了terraform init