Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mongodbatlas_search_index does not change name #1096

Closed
adamMo opened this issue Mar 9, 2023 · 3 comments
Closed

mongodbatlas_search_index does not change name #1096

adamMo opened this issue Mar 9, 2023 · 3 comments
Labels

Comments

@adamMo
Copy link

adamMo commented Mar 9, 2023

Terraform CLI and Terraform MongoDB Atlas Provider Version

Terraform v1.3.7
on linux_amd64
+ provider registry.terraform.io/hashicorp/archive v2.3.0
+ provider registry.terraform.io/hashicorp/aws v4.57.1
+ provider registry.terraform.io/hashicorp/null v3.2.1
+ provider registry.terraform.io/mongodb/mongodbatlas v1.8.1

Terraform Configuration File

resource "mongodbatlas_search_index" "name_email_idx" {
  name         = local.name_email_index
  project_id   = data.mongodbatlas_project.mongo_project.id
  cluster_name = data.mongodbatlas_advanced_cluster.mongo_cluster.name

  database        = var.mongo_users_db
  collection_name = "users"
# irrelevant rest
}

Steps to Reproduce

  1. Have present mongodbatlas_serach_index
  2. Attempt to change search index name, terraform plan shows that it would be changed
  3. Search index stays with the same name

Expected Behavior

Actual Behavior

Debug Output

Crash Output

Additional Context

References

@martinstibbe
Copy link
Contributor

martinstibbe commented Mar 10, 2023

@adamMo Confirmed I am able to replicate your issue will resolve in engineering ticket INTMDB-671

@martinstibbe martinstibbe added the not_stale Not stale issue or PR label Mar 10, 2023
@Zuhairahmed
Copy link
Collaborator

Zuhairahmed commented Mar 20, 2023

Hi @adamMo we just heard back from our Engineering team: You can change the index definition of an existing Atlas Search index. You cannot rename an index; if you need to change an index's name, you must create a new index and delete the old one. See docs here for more details. We will also update our Terraform Docs as well on Atlas Search Index resource accordingly to make more clear.

Hope this helps!

@Zuhairahmed Zuhairahmed added stale and removed not_stale Not stale issue or PR labels Mar 20, 2023
@Zuhairahmed Zuhairahmed reopened this Mar 30, 2023
@Zuhairahmed
Copy link
Collaborator

closing this issue, but feel free to re-open if you need anything else

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants