Terraform模块抛出错误“文字未终止”

问题描述 投票:-1回答:1

当我应用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'
}
amazon-web-services terraform
1个回答
0
投票

模块文件中的source字段未正确终止。它应该看起来像:模块文件:

module "Tr" {
  source = "../modules"
}
© www.soinside.com 2019 - 2024. All rights reserved.