File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change 11# #####################
22# VPC Endpoint for S3
33# #####################
4- data "aws_vpc_endpoint_service" "s3" {
5- count = " ${ var . create_vpc && var . enable_s3_endpoint ? 1 : 0 } "
4+ # Since 2.2.2021 there is an error:
5+ # Error: multiple VPC Endpoint Services matched; use additional constraints to reduce matches to a single VPC Endpoint Service
6+ # The solution is to not use aws_vpc_endpoint_service datasource, but use service_name explicitly in aws_vpc_endpoint.
7+ # data "aws_vpc_endpoint_service" "s3" {
8+ # count = "${var.create_vpc && var.enable_s3_endpoint ? 1 : 0}"
9+ #
10+ # service = "s3"
11+ # }
612
7- service = " s3"
8- }
13+ data "aws_region" "current" {}
914
1015resource "aws_vpc_endpoint" "s3" {
1116 count = " ${ var . create_vpc && var . enable_s3_endpoint ? 1 : 0 } "
1217
1318 vpc_id = " ${ local . vpc_id } "
14- service_name = " ${ data . aws_vpc_endpoint_service . s3 . service_name } "
19+ service_name = " com.amazonaws. ${ data . aws_region . current . name } .s3 "
1520
1621 tags = " ${ local . vpce_tags } "
1722}
You can’t perform that action at this time.
0 commit comments