我正在运行Terraform v0.9.11(不要问为什么),并在此之后:
https://www.terraform.io/docs/configuration/locals.html
我的模块代码是:
locals {
default_name_prefix = "${var.project_name}-web"
}
resource "aws_instance" "module_instance" {
ami = "<my ami>"
}
但我遇到了这个错误:
terraform plan
1 error(s) occurred:
* module root: 1 error(s) occurred:
* Unknown root level key: locals
有什么建议吗?