Basic issue is that only one VPC endpoint can exists per VPC. In my case I have multiple collections in one VPC and the terraform code should detect if a vpc_endpoint already exists and configure to use it.
Data Source: aws_opensearchserverless_vpc_endpoints check if vpc_endpoint exists for a specific VPC id or returns all vpc _endpoints if no vpc_id is passed in as the input attribute
Affected Resource(s) and/or Data Source(s)
Related to aws_opensearchserverless_vpc_endpoint
Potential Terraform Configuration
# Returns all VPC endpoints
data "aws_opensearchserverless_vpc_endpoints" "example" {
}
# Returns one endpoint for a specific VPC id
data "aws_opensearchserverless_vpc_endpoints" "example" {
vpc_id = "vpc-############"
}
References
terraform code would need to run something like the below AWS cli commands and then optionally filter for the specific vpcId
Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.
Volunteering to Work on This Issue
If you are interested in working on this issue, please leave a comment.
If this would be your first contribution, please review the contribution guide.
Description
Basic issue is that only one VPC endpoint can exists per VPC. In my case I have multiple collections in one VPC and the terraform code should detect if a vpc_endpoint already exists and configure to use it.
Data Source: aws_opensearchserverless_vpc_endpoints check if vpc_endpoint exists for a specific VPC id or returns all vpc _endpoints if no vpc_id is passed in as the input attribute
Affected Resource(s) and/or Data Source(s)
Related to aws_opensearchserverless_vpc_endpoint
Potential Terraform Configuration
References
terraform code would need to run something like the below AWS cli commands and then optionally filter for the specific vpcId
aws opensearchserverless batch-get-vpc-endpoint --ids $(aws opensearchserverless list-vpc-endpoints --query vpcEndpointSummaries[].id --output text)
Would you like to implement a fix?
None