mongodb / terraform-provider-mongodbatlas

Terraform MongoDB Atlas Provider: Deploy, update, and manage MongoDB Atlas infrastructure as code through HashiCorp Terraform
https://registry.terraform.io/providers/mongodb/mongodbatlas
Mozilla Public License 2.0
240 stars 168 forks source link

Unable to create project with peering only connections #24

Closed andrew-waters closed 4 years ago

andrew-waters commented 4 years ago

When creating a GCP peered cluster, the project configuration doesn't allow you to set it for peer networking only.

In order to create a project with peer networking you need to:

This is supported by the Atlas API (https://docs.atlas.mongodb.com/reference/api/set-private-ip-mode-for-project).

Looking through the source, it may be possible relatively easily to add a field to the project stanza (https://github.com/terraform-providers/terraform-provider-mongodbatlas/blob/master/mongodbatlas/resource_mongodbatlas_project.go#L21-L38) which can then fire off the appropriate API call.

It's possible I've missed some documentation so thoughts would be very welcome

andrew-waters commented 4 years ago

As an FYI this is the UI element on the project page that needs toggling:

Screenshot 2019-09-12 at 17 53 01
themantissa commented 4 years ago

Thank you @andrew-waters. We are working to ensure that is also settable via the Terraform provider. Will update the issue when address.

andrew-waters commented 4 years ago

Thanks @themantissa - do you have a rough idea when this is being addressed / potentially fixed? I'd like to explore some other options, including unofficial providers such as https://github.com/akshaykarle/terraform-provider-mongodbatlas

themantissa commented 4 years ago

@andrew-waters should be pretty soon. Akshay is actually thanked in our README :) He's done some great work in the community provider but be aware it uses quite a few deprecated API options which is part of why we created this one. If you have any other questions feel free to reach out to me directly, melissa.plunkett@mongodb.com