Giter VIP home page Giter VIP logo

Comments (6)

themantissa avatar themantissa commented on June 3, 2024 2

I repro'ed changing the project name yesterday and Terraform properly notifies upon both plan and apply that changing the name will destroy all the related resources and create them again (it does not show anything changed). As I noted yesterday the API's Project resource has no PATCH method so while the name can be changed in the UI it cannot be done so by infrastructure managed by Terraform at this time (a request for a PATCH method has been submitted internally). We protect users from deleting a project with clusters in the UI and via the DELETE method for Projects, however in doing things the Terraform way it skips these checks. The team is investigating a way to protect users who miss the aforementioned Terraform feedback. In the mean time we will make it clear on the page for the Projects resources that the name cannot be changed via the Terraform provider without fully deleting and re-creating the project.

from terraform-provider-mongodbatlas.

nikhil-mongo avatar nikhil-mongo commented on June 3, 2024

@nathankodilla

The project rename is an Atlas UI feature and there is no public API to achieve this. Therefore, terraform is applying the changes in correct manner as it does not finds any reference to the old cluster name anywhere in the .tf file.

So, when the name is changed, terraform sees that you do not need the older project anymore and there is no reference to the old name in .tf files. Therefore, it deletes the entire project with the cluster(all the data gone) -> creates a new project -> launches the cluster(this will have no data).

@themantissa Please correct if I am wrong with this workflow.

from terraform-provider-mongodbatlas.

themantissa avatar themantissa commented on June 3, 2024

@nikhil-mongo thank you for helping and yes, I believe you are correct. There is no API method to update project names https://docs.atlas.mongodb.com/reference/api/projects/ hence we cannot support this in the Provider. However we should find a way to handle as deleting the project just by changing the name is not a desired behavior - @PacoDw @marinsalinas thoughts?

from terraform-provider-mongodbatlas.

themantissa avatar themantissa commented on June 3, 2024

Closing this issue out as actions taken seem to have prevented more pain in this area. We have an internal request to add a PATCH to project so we can implement with INTMDB-220. fyi @Zuhairahmed

from terraform-provider-mongodbatlas.

nkkowa avatar nkkowa commented on June 3, 2024

This is still the case in the latest provider version (1.8.2), API method to PATCH project name has been added:
https://www.mongodb.com/docs/atlas/reference/api-resources-spec/#tag/Projects/operation/updateProject

from terraform-provider-mongodbatlas.

Zuhairahmed avatar Zuhairahmed commented on June 3, 2024

Thanks @nkkowa yes this is on our roadmap to support and should be out later this year for Terraform support. Feel free to create a new issue if you need anything else

from terraform-provider-mongodbatlas.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.