Skip to content

Commit

Permalink
add back
Browse files Browse the repository at this point in the history
  • Loading branch information
badra001 committed Jan 18, 2022
1 parent 90623fe commit 3ef5ba8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions vpc-interface-endpoint/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ No modules.
| [aws_vpc_endpoint.interface_endpoint](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/vpc_endpoint) | resource |
| [aws_arn.current](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/arn) | data source |
| [aws_caller_identity.current](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/caller_identity) | data source |
| [aws_network_interface.vpce_interfaces](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/network_interface) | data source |
| [aws_region.current](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/region) | data source |
| [aws_vpc_endpoint_service.interface_endpoint](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/vpc_endpoint_service) | data source |

Expand Down
10 changes: 5 additions & 5 deletions vpc-interface-endpoint/outputs.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# data "aws_network_interface" "vpce_interfaces" {
# for_each = toset(aws_vpc_endpoint.interface_endpoint.network_interface_ids)
# id = each.key
# }
data "aws_network_interface" "vpce_interfaces" {
for_each = toset(aws_vpc_endpoint.interface_endpoint.network_interface_ids)
id = each.key
}

output "vpce_service_info" {
description = "VPC Interface Endpoint information for service"
Expand All @@ -13,6 +13,6 @@ output "vpce_service_info" {
"subnet_ids" = aws_vpc_endpoint.interface_endpoint.subnet_ids,
"network_interface_ids" = aws_vpc_endpoint.interface_endpoint.network_interface_ids,
"subnet_interface_id_map" = zipmap(tolist(aws_vpc_endpoint.interface_endpoint.subnet_ids), tolist(aws_vpc_endpoint.interface_endpoint.network_interface_ids)),
# "subnet_interface_ip_map" = zipmap(tolist(aws_vpc_endpoint.interface_endpoint.subnet_ids), [for k, v in data.aws_network_interface.vpce_interfaces : v.private_ip]),
"subnet_interface_ip_map" = zipmap(tolist(aws_vpc_endpoint.interface_endpoint.subnet_ids), [for k, v in data.aws_network_interface.vpce_interfaces : v.private_ip]),
}
}

0 comments on commit 3ef5ba8

Please sign in to comment.