-
Notifications
You must be signed in to change notification settings - Fork 300
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
Workaround API consistency bugs for various resources #659
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @manicminer - LGTM aside from some minor comments i've left inline 🌵
internal/services/directoryroles/directory_role_member_resource.go
Outdated
Show resolved
Hide resolved
internal/services/serviceprincipals/service_principal_certificate_resource.go
Outdated
Show resolved
Hide resolved
internal/services/applications/application_certificate_resource.go
Outdated
Show resolved
Hide resolved
internal/services/applications/application_password_resource.go
Outdated
Show resolved
Hide resolved
…flatten funcs into own source file
… patch the guest user, use helper func for consistency check on deletion, move flatten/expand funcs to own source file
…ch the new group, perform consistency check on deletion
…to patch the new application, perform consistency check on deletion
…pting to patch the new service principal, perform consistency check on deletion
5751d0e
to
a9abfd8
Compare
Thanks @katbyte! Have tidied those up 👍 |
This functionality has been released in v2.9.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! |
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. |
Add some helper funcs for post-deletion check and identifying key/password credentials
Increase the default retry limit by one - making it 9 retries after the first attempt for a total of 10 requests with exponential backoff
Consistency fixes for various resources:
azuread_application_certificate
: check for consistency on deletionazuread_application_password
: check for consistency on deletionazuread_directory_role_member
: check for consistency on deletionazuread_group
: check for consistency on creation by attempting to patch the new group, perform consistency check on deletionazuread_group_member
: check for consistency on deletionazuread_invitation
: check for consistency on creation by attempting to patch the guest user, use helper func for consistency check on deletion, move flatten/expand funcs to own source fileazuread_service_principal
: check for consistency on creation by attempting to patch the new service principal, perform consistency check on deletionazuread_service_principal_certificate
: check for consistency on deletionazuread_service_principal_password
: check for consistency on deletionazuread_user
: check for consistency on deletionNote that some of these resources already attempted to PATCH themselves after creation with an empty object. It's become clear that the API is filtering these out and returning early, unless there is an actual property in the body to be changed. So now we're choosing a property to update for each resource and ensuring that a valid change is sent in the PATCH request.
Closes: #578
Closes: #611