I am trying to get TGW VPC Attachment data source using a vpc_owner_id filter.
I tried:
data "aws_ec2_transit_gateway_vpc_attachment" "attach" { filter { name = "vpc-owner-id" values = ["543265436543"]
}
}and
data "aws_ec2_transit_gateway_vpc_attachment" "attach" { filter { name = "vpc_owner_id" values = ["543265436543"]
}
}and
data "aws_ec2_transit_gateway_vpc_attachment" "attach" { filter { name = "resource-owner-id" values = ["543265436543"]
}
}I get that the Value for the parameter Filter is invalid.
One of the attributes of the TGW VPC Attachment is vpc_owner_id.
Is that possible to get this data source using vpc owner id Filter?
1 Answer
There are no filters vpc_owner_id nor vpc-owner-id. The only valid one is resource-owner-id. For the list of valid filters please refer to AWS docs.
If any of the given filters does not suit you, you have to develop your own custom data source.
1