File tree Expand file tree Collapse file tree 2 files changed +42
-2
lines changed Expand file tree Collapse file tree 2 files changed +42
-2
lines changed Original file line number Diff line number Diff line change @@ -79,8 +79,9 @@ resource "aws_route_table_association" "private_rt_association" {
79
79
}
80
80
81
81
resource "aws_vpc_endpoint" "dynamodb" {
82
- service_name = " com.amazonaws.${ var . aws_region } .dynamodb"
83
- vpc_id = aws_vpc. main . id
82
+ service_name = " com.amazonaws.${ var . aws_region } .dynamodb"
83
+ vpc_id = aws_vpc. main . id
84
+ vpc_endpoint_type = " Gateway"
84
85
85
86
route_table_ids = [aws_route_table . public_rt . id ]
86
87
@@ -89,6 +90,22 @@ resource "aws_vpc_endpoint" "dynamodb" {
89
90
}
90
91
}
91
92
93
+
94
+ resource "aws_vpc_endpoint" "sqs" {
95
+ service_name = " com.amazonaws.${ var . aws_region } .sqs"
96
+ vpc_id = aws_vpc. main . id
97
+ vpc_endpoint_type = " Interface"
98
+
99
+ subnet_ids = aws_subnet. public_subnets [* ]. id
100
+ security_group_ids = [aws_default_security_group . default . id ]
101
+
102
+ private_dns_enabled = true
103
+
104
+ tags = {
105
+ Name = " SOAT-TC SQS VPC Interface Endpoint"
106
+ }
107
+ }
108
+
92
109
resource "aws_default_security_group" "default" {
93
110
vpc_id = aws_vpc. main . id
94
111
Original file line number Diff line number Diff line change @@ -56,3 +56,26 @@ output "vpc_private_rt" {
56
56
" vpc_id" : aws_route_table.private_rt.vpc_id
57
57
}
58
58
}
59
+
60
+ output "vpc_endpoint_dynamodb" {
61
+ description = " Endpoint for DynamoDB"
62
+ value = {
63
+ " arn" : aws_vpc_endpoint.dynamodb.arn,
64
+ " id" : aws_vpc_endpoint.dynamodb.id,
65
+ " service_name" : aws_vpc_endpoint.dynamodb.service_name,
66
+ " vpc_endpoint_type" : aws_vpc_endpoint.dynamodb.vpc_endpoint_type,
67
+ " vpc_id" : aws_vpc_endpoint.dynamodb.vpc_id,
68
+ }
69
+ }
70
+
71
+ output "vpc_endpoint_sqs" {
72
+ description = " Endpoint for SQS"
73
+ value = {
74
+ " arn" : aws_vpc_endpoint.sqs.arn,
75
+ " dns_entry" : aws_vpc_endpoint.sqs.dns_entry,
76
+ " id" : aws_vpc_endpoint.sqs.id,
77
+ " service_name" : aws_vpc_endpoint.sqs.service_name,
78
+ " vpc_endpoint_type" : aws_vpc_endpoint.sqs.vpc_endpoint_type,
79
+ " vpc_id" : aws_vpc_endpoint.sqs.vpc_id,
80
+ }
81
+ }
You can’t perform that action at this time.
0 commit comments