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

Add name argument in mongodbatlas_project datasource #140

Closed aklotos closed 4 years ago

aklotos commented 4 years ago

As previously pointed at in this issue there is a convenience in retrieving of mongodbatlas_project by name as well. It used to be available in v0.3.0 and not available anymore. Currently mongodbatlas_project datasource accepts only project_id as an argument as per documentation.

Moreover a side question. I consider this change in datasource argument a breaking change. Is it expected that with a breaking change only minor version of tf provider is changed?

marinsalinas commented 4 years ago

Hello, @aklotos name was changed to project id on this commit https://github.com/terraform-providers/terraform-provider-mongodbatlas/commit/a9ae7aa89c58047c058e4d74b3e60b89a2a10725#diff-6fa79410e48e7733c5f9838df2fb07ba

@PacoDw what was the reason for this change?

PacoDw commented 4 years ago

Hello @aklotos and @marinsalinas, I'm so sorry for all the things it causes, I changed it to improve the project data source, and to have coherency with the other resources, handle the resource with an ID is better.

themantissa commented 4 years ago

@PacoDw and @marinsalinas thank you for the quick investigation in the matter.

@aklotos this was indeed a regression and will be corrected. Appreciate that you filed an issue.

Regarding the side question - while this change was not intentional if we must make a breaking change we will include it in an upgrade-guide (see issue 139 for the last example. We've been staying in a minor version pattern until we are close to covering the majority of Atlas' functionality, at that point it will make sense to be at 1.0.0 (other providers followed a similar pattern from my own investigations). Each version jump we've done quite a bit, as covered in the CHANGELOG so they may be minor but building quite a bit each time. I hope that helps clarify but always feel free to reach out and ask if you have any concerns.

themantissa commented 4 years ago

Final note: we'll release a minor version early next week with this fix.