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

azurerm_cosmosdb_account : Fix issue about enabling analytical storage for CosmosDB is forcing re-creation #19659

Merged
merged 4 commits into from
Dec 14, 2022

Conversation

sinbai
Copy link
Contributor

@sinbai sinbai commented Dec 13, 2022

Currently, since analytical_storage_enabled is a ForceNew property, the azurerm_cosmosdb_account is recreated when its value changes.

In fact, analytical_storage_enabled could be enabled when it is disabled, but it could not be disabled after it is enabled. So submitting this PR just sets ForceNew to true when its value changes from true to false.

Fix #19630.

Test Results:
PASS: TestAccCosmosDBAccount_analyticalStorage (1818.29s)

Copy link
Member

@stephybun stephybun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this @sinbai, still need to update the docs but otherwise this is good to go 👍

@sinbai
Copy link
Contributor Author

sinbai commented Dec 14, 2022

Thanks for this @sinbai, still need to update the docs but otherwise this is good to go 👍

Thanks for your feedback @stephybun , I have updated the doc, could you please take another look and feel free to let me know your suggestions?

@stephybun stephybun added the bug label Dec 14, 2022
Copy link
Member

@stephybun stephybun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @sinbai LGTM 👍

@stephybun stephybun merged commit d9491c8 into hashicorp:main Dec 14, 2022
stephybun added a commit that referenced this pull request Dec 14, 2022
@stephybun stephybun added this to the v3.36.0 milestone Dec 14, 2022
@github-actions
Copy link

This functionality has been released in v3.36.0 of the Terraform Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@sinbai sinbai deleted the cosmos/fix_issue_19630 branch December 20, 2022 02:16
favoretti pushed a commit to favoretti/terraform-provider-azurerm that referenced this pull request Jan 12, 2023
…age for CosmosDB is forcing re-creation (hashicorp#19659)

* fix issue 19630

* update code

* update code

* update code
favoretti pushed a commit to favoretti/terraform-provider-azurerm that referenced this pull request Jan 12, 2023
@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enabling Analytical storage for CosmosDB is forcing re-creation
2 participants