DynamoDB now supports both Interface Endpoint and Gateway Endpoint. How we can enable both using AWS VPC Endpoints Terraform sub-module? I suppose we cannot specify two dynamodb blocks.
module "endpoints" {
source = "terraform-aws-modules/vpc/aws//modules/vpc-endpoints"
vpc_id = "vpc-12345678"
security_group_ids = ["sg-12345678"]
endpoints = {
dynamodb = {
# Interface endpoint
service = "dynamodb"
},
dynamodb = {
# gateway endpoint
service = "dynamodb"
route_table_ids = ["rt-12322456", "rt-43433343", "rt-11223344"]
}
}
tags = {
Owner = "user"
Environment = "dev"
}
}