跑在我的根目录Terraform一个terraform output
我得到:无法找到模块根目录。没有什么可以输出
The module root could not be found. There is nothing to output.
我有以下文件:
iam.tf
resource "aws_iam_user" "a_user" {
name = "a_user"
}
output.tf
数据“aws_caller_identity”“current”{}
output "account_id" {
value = "${data.aws_caller_identity.current.account_id}"
}
这https://www.terraform.io/docs/modules/index.html说:
Root module That is the current working directory when you run terraform apply or get, holding the Terraform configuration files. It is itself a valid module.
任何想法,为什么错误信息,以及如何解决?