当我应用Terraform计划时,它显示错误加载配置:错误解析“位置” 2:21:文字未终止
模板文件
provider "aws" {
region = "${var.region}"
}
resource "aws_instance" "modDem" {
ami = "${var.ami`enter code here`i}"
instance_type = "{var.instance}"
tags {
Name = "Demo"
}
}
变量文件
variable "amii" {
default = "ami-22b9a343"
}
variable "instance" {
default = "t2.micro"
}
variable "region" {
default = "us-west-2"
}
模块文件:
module "Tr" {
source = "../modules'
}
答案 0 :(得分:0)
模块文件中的source
字段未正确终止。它看起来应该像这样:
模块文件:
module "Tr" {
source = "../modules"
}