我正在尝试为aws_key_path和name定义一些变量,但是在Terraform初始化时出现错误
# variables.tf
variable "aws_key_path" {
aws_key_path = "Users/user/Documents/folder/filename.pem"
}
variable "aws_key_name" {
aws_key_name = "filename"
}
# main.tf
module "us-west-1" {
source = "./some_sorce"
aws_key_path = "${var.aws_key_path}"
aws_key_name = "${var.aws_key_name}"
aws_region = "us-west-1"
amis = "${var.amis}"
providers = {
aws.source = "aws.us-west-1"
}
}
初始化时出错:
怎么了?
谢谢
答案 0 :(得分:0)
这些不是环境变量。
Terraform变量的定义如下:
variable "aws_key_name" {
default = "filename"
}