" terraform":无法在Terraform文档中运行Module示例

时间:2017-07-07 14:12:41

标签: terraform

我按照https://www.terraform.io/intro/getting-started/modules.html的说明进行了操作。我可以通过名称" consul-0"看到一个EC2实例。已创建并运行,但我的cmd窗口显示以下错误: -

c:\>terraform apply -var-file secret.tfvars

...
module.consul.aws_instance.server.0: Provisioning with 'remote-exec'...
module.consul.aws_instance.server.0 (remote-exec): Connecting to remote host via SSH...
module.consul.aws_instance.server.0 (remote-exec):   Host: 34.201.64.83
module.consul.aws_instance.server.0 (remote-exec):   User: ubuntu
module.consul.aws_instance.server.0 (remote-exec):   Password: false
module.consul.aws_instance.server.0 (remote-exec):   Private key: true
module.consul.aws_instance.server.0 (remote-exec):   SSH Agent: false
module.consul.aws_instance.server.0 (remote-exec): Connected!
module.consul.aws_instance.server.0: Still creating... (1m0s elapsed)
module.consul.aws_instance.server.0 (remote-exec): /usr/bin/env: bash
module.consul.aws_instance.server.0 (remote-exec): : No such file or directory
Error applying plan:

1 error(s) occurred:

* module.consul.aws_instance.server[0]: 1 error(s) occurred:

* Script exited with non-zero exit status: 127

Terraform does not automatically rollback in the face of errors.
Instead, your Terraform state file has been partially updated with
any resources that successfully completed. Please address the error
above and apply again to incrementally change your infrastructure.

知道可能是什么问题吗?感谢您的帮助。

0 个答案:

没有答案