Comments (6)
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.
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.
@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.
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.
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.
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)
- [Bug]: backup_compliance_policy resource missing required attribute HOT 3
- [Bug]: Provider produces inconsistent result after importing encryption_at_rest HOT 4
- [Bug]: <oplog_min_retention_hours is not expected here> HOT 1
- [Bug]: Changing Scope block in the databaseuser resource results in a replacement HOT 8
- Serverless aws_vpc_endpoint creation fails HOT 3
- Error creating user (mongodbatlas_database_user) HOT 2
- CANNOT_DISABLE_PIT_WITH_BACKUP_COMPLIANCE_POLICY HOT 5
- [Bug]: Undocumented behaviour privatelink_endpoint / circle dependency HOT 6
- [Bug]: Can't setup privatelink_endpoint_service_data_federation_online_archive region or VPC Endpoint DNS Name for AWS HOT 13
- [Bug]: Unable to create billing alert configuration. HOT 3
- [Feature]: unable to setup log forwarding to S3 HOT 2
- [Bug]: missing data source for app_id & service_id HOT 2
- [Bug]: Many provider crashes when running from GitLab CI pipeline HOT 6
- [Feature]: Add resources to automatically create mongodbatlas_event_trigger resource HOT 2
- What will happen to the password field when DB user is imported? HOT 4
- [Feature]: Add resources to create function HOT 3
- [Bug]: Impossible to create a database scope (database watch against) in mongodbatlas_event_trigger HOT 4
- [Bug]: mongodbatlas_privatelink_endpoint_service for GCP - Provider produced inconsistent final plan HOT 12
- [Bug] mongodbatlas_custom_db_role created with the wrong permissions HOT 5
- [Feature]: mongodbatlas_event_trigger does not support Database operations HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from terraform-provider-mongodbatlas.