我正在使用 terraform 注册表中的 vpc 模块来创建 vpc。
module "vpc" {
source = "terraform-aws-modules/vpc/aws"
version = "2.77.0"
....
}
我想删除附加到公共子网的 igw。任何帮助,将不胜感激。
我正在使用 terraform 注册表中的 vpc 模块来创建 vpc。
module "vpc" {
source = "terraform-aws-modules/vpc/aws"
version = "2.77.0"
....
}
我想删除附加到公共子网的 igw。任何帮助,将不胜感激。
该模块提供create_igw
选项:
variable "create_igw" {
description = "Controls if an Internet Gateway is created for public subnets and the related routes that connect them."
type = bool
default = true
}
如果您不想要 igw,则将其设置为 false:
module "vpc" {
source = "terraform-aws-modules/vpc/aws"
version = "2.77.0"
....
create_igw = false
}