Closed ghost closed 4 years ago
@Crusad once you create a container and a peer the request is made to AWS and the returned value from AWS is then contained in the connection_id
returned value from mongodbatlas_network_peering. mongodbatlas_network_peering
will have the pcx- value so you can use it with aws_vpc_peering_connection_accepter
.
Also please do that per the README support is provided under MongoDB Atlas support agreements, Issues is for reporting bugs/issues with the provider.
@Crusad - wanted to double check and yes, setting the following after creating both your container and peer for Atlas will auto accept on the AWS side:
resource "aws_vpc_peering_connection_accepter" "peer" {
vpc_peering_connection_id = "${mongodbatlas_network_peering.test.connection_id}"
auto_accept = true
}
Thanks, and I am sorry @themantissa - I had actually completely different problem in Terraform and it led me to believe there is something wrong with the resource. I confirm it works as desired/intended.
Hi, I am requesting network peering from Atlas to my VPC and would like to accept it with aws_vpc_peering_connection_accepter. I tested many ways but still cannot get the
pcx-
identifier. Now I tried data sourcemongodbatlas_network_peering
but it retrieves internal Atlas connection ID when I use theid
andconnection_id
attribute of the data source.I would like to get the
pcx-
identifier for the accepter resource but can't figure out how. I see that Atlas API doesn't return this value in the responses - can Atlas add this into the response so this could be retrieved with the data source? Or even better - refer to it as attribute of themongodbatlas_network_peering
resource?