Closed webstean closed 2 months ago
Hi @webstean
I would say this is working as designed as Dataverse does not allow to in/uninstall two solutions at the same time. What you can do is to use depends_on for your solutions, so that they install and uninstall one after another.
powerplatform_solution sol1 {
....
}
powerplatform_solution sol2 {
...
depends_on = [
powerplatform_solution.sol1
]
}
@mawasile Appreciate the response.
But wouldn't it be better if the provider handled these sort of API limitations itself? I know a lot of the Terraform providers do these sort of things (e.g. back of after receiving a too busy error, and try again) After all, isn't the goal of Terraform to be a declarative coding tool that describes the desired “end-state”, not just thin layer over an API. IMHO
Yes, you are right, the uninstall exception or any other 50x exception may happen outside terraform state. We are working on retrying on most comment exceptions including user defined timeout value per resource operation. That will fix the uninstall issue that you are experiencing. Will be shipped with next release.
Fixed in #412.
Describe the bug
Error:
powerplatform_solution.solution-test1["env2"]: Destruction complete after 20s ╷ │ Error: Client error when deleting powerplatform__solution │ │ status: 503, message: {"error":{"code":"0x80071151","message":"Cannot start │ another [Uninstall] because there is a previous [Uninstall] running at this │ moment. Use Solution History for more details. -- The solution installation │ or removal failed due to the installation or removal of another solution at │ the same time. Please try again later."}} ╵ Releasing state lock. This may take a few moments...
To Reproduce
Steps to reproduce the behavior:
Create multiple solutions in an environment Do a Terraform Destroy or remove the solutions from the Terraform config
Sample Terraform Code
Expected behavior
The provider should seamlessly delete, wait, delete etc.. similar to what Terraform users expect with other providers like Azurerm, Azure AD, AWS etc...
When the above error happens, the provider should wait and try again by itself.
System Information
n/a
Additional context
Add any other context about the problem here.
Contribution
Contribution
Do you plan to raise a PR to address this issue? NO