我正在尝试创建一个 terraform 配置来启动不同区域中的多个 VPC 并在它们之间创建 VPC 对等连接。
这是我的 VPC 模块
# Required Variables
variable "region" {}
variable "cluster_name" {}
variable "region_name" {}
variable "nb_nodes" {}
variable "vpc_cidr" {}
# Default Variables
variable "instance_type" {
default = "t2.nano"
}
variable "public_key_path" {
default = "id_rsa.pub"
}
variable "private_key_path" {
default = "id_rsa"
}
variable "ami-username" {
default = "ubuntu"
}
variable "ami" {
type = "map"
default = {
us-east-1 = "ami-0f9cf087c1f27d9b1"
us-east-2 = "ami-0653e888ec96eab9b"
}
}
variable "availability_zone" {
type …
Run Code Online (Sandbox Code Playgroud)