Open
Description
Terraform Version
Terraform v1.2.8
Affected Resource(s)
- astra_private_link
- astra_private_link_endpoint
Terraform Configuration Files
Link to terraform scripts as a zipped file:
https://drive.google.com/drive/folders/1VNbs8DCGkP6-3HbzmZw4wOa8rGDtdswF?usp=sharing
Expected Behavior
The resource 'astra_private_link' should create a private link successfully on the console. In addition, the link 'astra_private_link_endpoint' should create the endpoint successfully on Astra.
The corresponding private link endpoint on AWS was created successfully:
Actual Behavior
The resource 'astra_private_link_endpoint' is throwing the following error:
│ Error: creating EC2 VPC Endpoint (com.amazonaws.vpce.us-east-1.vpce-svc-0228650ceacbd2889): InvalidServiceName: The Vpc Endpoint Service 'com.amazonaws.vpce.us-east-1.vpce-svc-0228650ceacbd2889' does not exist
│ status code: 400, request id: 79704ad5-52b8-4b33-bcc6-9879b68b5c6d
│
│ with aws_vpc_endpoint.online_shopping_vpc_endpoint,
│ on main.tf line 63, in resource "aws_vpc_endpoint" "online_shopping_vpc_endpoint":
│ 63: resource "aws_vpc_endpoint" "online_shopping_vpc_endpoint" {
Steps to Reproduce
- Create a VPC in AWS using UI
- Create an endpoint in AWS using UI
- Run the terraform resources related to 'astra_private_link' and 'astra_private_link_endpoint'
- Notice the error described above on the tf side despite having a VPC and an endpoint in AWS
Important Factoids
This is the code I am running for your reference:
#Creation of a private link on Astra DB
resource "astra_private_link" "online_shopping_privatelink" {
allowed_principals = ["arn:aws:iam::111708290731:role/aditya.trilok"]
database_id = "016114a8-431f-47db-95e1-14c0e2180c52"
datacenter_id = "016114a8-431f-47db-95e1-14c0e2180c52-1"
}
#Create a VPC endpoint on AWS
resource "aws_vpc_endpoint" "online_shopping_vpc_endpoint" {
vpc_id = "vpc-0ed0543943cdaa4a4"
service_name = astra_private_link.online_shopping_privatelink.service_name
vpc_endpoint_type = "Interface"
subnet_ids = ["subnet-0538fcea9f74c9bc9","subnet-0cd081c0072226c9b"]
security_group_ids = ["sg-09e3a526e286ce753"]
}
┆Issue is synchronized with this Jira Task by Unito
┆Issue Number: TERRA-95
┆Priority: Major
Metadata
Metadata
Assignees
Labels
No labels