I am trying to implement the TransitGateway Appliance VPC scenario from the documentation, using Terraform but run into trouble when I want to specify “appliance mode” for the vpc attachment to vpc-c:
resource "aws_vpc" "vpc_c" {
cidr_block = "192.168.0.0/16"
}
resource "aws_subnet" "subnets_in_vpc_c" {
count = 2
vpc_id = aws_vpc.vpc_c.id
cidr_block = cidrsubnet(aws_vpc.vpc_c.cidr_block, 8, count.index)
}
resource "aws_ec2_transit_gateway" "example" {}
resource "aws_ec2_transit_gateway_vpc_attachment" "vpc_c" {
subnet_ids = aws_subnet.subnets_in_vpc_c[*].id
transit_gateway_id = aws_ec2_transit_gateway.example.id
vpc_id = aws_vpc.vpc_c.id
#appliance_mode_support = enable
#dns_support = enable
}
output "appliance_mode" {
value = aws_ec2_transit_gateway_vpc_attachment.vpc_c.appliance_mode_support
}
Uncommenting either appliance_mode_support
or dns_support
result in Terraform complaining about an “Invalid Reference” (even though those two arguments (and more) are perfectly ok according to the documentation)
Am I doing something completely wrong here?
/klang
Terraform v1.4.0-rc1
on darwin_arm64
+ provider registry.terraform.io/hashicorp/aws v4.57.0