Open iam-take opened 10 months ago
I am having similar problems. I pretty much did the same thing as the above. Manually deleted a resource group through the Azure Portal. Re-running the pipeline, I am getting the same error as above.
+1
We are running into this issue as well. It's happening reading azuredevops_project too. Interestingly it works on a different workspace.
I can confirm that the issue is still present in 0.11.0 and that the provided workaround is successful for the issue with group entitlement.
I can confirm that similar sort of issue is present with azuredevops_serviceendpoint_kubernetes. I am using microsoft/azuredevops v1.2.0
Reference comment: https://github.com/microsoft/terraform-provider-azuredevops/issues/918#issuecomment-2273127755
I have one question though at this moment. Is it safe to remove resources from state file like mentioned above?
It seems like a workaround and something that cant be done in prod environment. Is there no better approach to deal with this?
We created a Azure DevOps group via Terraform, creation went fine but we removed it manually from the portal. When rerunning the code the provider will crash.
A similar issue was also reported by @FRUCHTiii I have the feeling more resources could be effected with the same issue.
Removing the resources from the state file with terraform state rm will resolve the issue so you can redeploy them.
Community Note
Terraform (and Azure DevOps Provider) Version
Terraform Version 1.5.7 Provider version 0.10.0
Affected Resource(s)
azuredevops_group
azuredevops_group_entitlement
Terraform Configuration Files
Debug Output
Panic Output
Expected Behavior
The provider should have seen the group has been removed and recreate it.
Actual Behavior
Provider crashes
Steps to Reproduce
terraform apply
Important Factoids
References
918