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 for upstream Microsoft API updating identity and default_identity at the same time silently fails issue #21780

Merged
merged 17 commits into from
May 24, 2023

Conversation

WodansSon
Copy link
Collaborator

Fixes:

IcM       : #383341730
Azure Bug : #2209567 - Updating identities and default identity at the same time fails silently

This is a mess and a total nightmare due to the Azure Bug: 2209567, however I feel this is the best we can do within the provider to compensate for that issue.

@WodansSon WodansSon changed the title azurerm_cosmosdb_account - Updating identities and default identity at the same time silently fails azurerm_cosmosdb_account - Updating identity and default_identity at the same time silently fails May 14, 2023
@WodansSon WodansSon marked this pull request as draft May 15, 2023 02:11
@WodansSon WodansSon marked this pull request as ready for review May 15, 2023 09:25
@WodansSon WodansSon marked this pull request as draft May 16, 2023 05:44
@WodansSon WodansSon marked this pull request as ready for review May 17, 2023 04:06
@WodansSon WodansSon changed the title azurerm_cosmosdb_account - Updating identity and default_identity at the same time silently fails azurerm_cosmosdb_account - fix for upstream Microsoft API updating identity and default_identity at the same time silently fails issue May 17, 2023
@WodansSon WodansSon added the upstream/microsoft Indicates that there's an upstream issue blocking this issue/PR label May 17, 2023
@WodansSon
Copy link
Collaborator Author

WodansSon commented May 17, 2023

Test Pass against PR:
image

Test Pass against Main:
image

@WodansSon WodansSon modified the milestones: Future, v3.57.0 May 18, 2023
@katbyte katbyte modified the milestones: v3.57.0, v3.58.0 May 19, 2023
@hashicorp hashicorp deleted a comment from github-actions bot May 19, 2023
Copy link
Contributor

@tombuildsstuff tombuildsstuff left a comment

Choose a reason for hiding this comment

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

Left a couple of comments in-line, but skimming through this otherwise looks alright - @katbyte has the most context of CosmosDB and should give this a second review, however

err = resourceCosmosDbAccountApiUpsert(client, ctx, id.ResourceGroup, id.Name, account, d)
if err != nil {
return fmt.Errorf("updating %s locations: %+v", id, err)
d.SetId(id.ID())
Copy link
Contributor

Choose a reason for hiding this comment

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

whilst outside the scope of this PR - the ID shouldn't change during the Update, so we can remove this:

Suggested change
d.SetId(id.ID())

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It was like that, so I didn't know if it was some special logic for the CosmosDB or not so I didn't touch it. 🙂

Fixed.

Copy link
Collaborator

@katbyte katbyte left a comment

Choose a reason for hiding this comment

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

LGTM 💾

@WodansSon WodansSon merged commit 4be0049 into main May 24, 2023
15 checks passed
@WodansSon WodansSon deleted the b_cosmos_workaround branch May 24, 2023 21:29
WodansSon added a commit that referenced this pull request May 24, 2023
@github-actions
Copy link

This functionality has been released in v3.58.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!

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 May 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation service/cosmosdb size/XL upstream/microsoft Indicates that there's an upstream issue blocking this issue/PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants