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_role_assignment - fix race condition in read after create #10134

Merged
merged 7 commits into from
Jan 12, 2021

Conversation

jackofallops
Copy link
Member

supersedes #9698

fixes #9379

This PR resolves some long standing issues in role_assignment by moving the consistency check into the create retry logic. It also separates tests that have a uniqueness constraint on them for definition/scope combinations.

@jackofallops jackofallops added this to the v2.43.0 milestone Jan 11, 2021
@jackofallops jackofallops requested a review from a team January 11, 2021 16:00
@ghost ghost added the size/M label Jan 11, 2021
@jackofallops jackofallops changed the title rework for checking consistency in retry func azurerm_role_assignment - fix race condition in read after create Jan 11, 2021
Copy link
Member

@mbfrahry mbfrahry left a comment

Choose a reason for hiding this comment

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

LGTM!

@ghost ghost added size/XL and removed size/M labels Jan 12, 2021
@jackofallops
Copy link
Member Author

Test passing, service failures unrelated to change and will be addressed in follow-up PR.

image

@jackofallops jackofallops merged commit 9f834a6 into master Jan 12, 2021
@jackofallops jackofallops deleted the b/role_assignment_race_create branch January 12, 2021 11:12
jackofallops added a commit that referenced this pull request Jan 12, 2021
@ghost
Copy link

ghost commented Jan 14, 2021

This has been released in version 2.43.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example:

provider "azurerm" {
    version = "~> 2.43.0"
}
# ... other configuration ...

@ghost
Copy link

ghost commented Feb 11, 2021

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!

@ghost ghost locked as resolved and limited conversation to collaborators Feb 11, 2021
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.

RoleAssignmentNotFound with azurerm_role_assignment
2 participants