You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
NOTE: This issue appears inconsistently. With the same Terraform configuration and the same commands, this configuration will sometimes apply and destroy as expected. Other-times not.
Applying this plan should consistently create a project under my organization in Azure Devops and consistently be tracked in the Terraform state.
Actual Behavior
NOTE: This issue appears inconsistently. With the same Terraform configuration and the same commands, this configuration will sometimes apply and destroy as expected. Other-times not.
Applying this plan led to Terraform throwing the error: Error: Provider produced inconsistent result after apply
The project is created and viewable in the UI
When running apply a second time Terraform throws this error indicating it is not tracking the resource state: Error: Error creating project: TF200019: The following project already exists on the Azure DevOps Server: TEST_PROJECT_00. You cannot create a new project with the same name as an existing project. Provide a different name.
terraform destroy (as expected) does not have any trackable resources to destroy
@bb-josh Thanks for the feedback. I can reproduce this error by manually change the service response. The project has been created but when provider try get the project, service response indicate that this project was not found. In this scenario, the ADO provider will set resource ID to empty string to notify Terraform that this resource should be deleted from the state file. One way to fix this issue is enhance the get project logic, a retry logic should be helpful here.
Community Note
Terraform (and Azure DevOps Provider) Version
Affected Resource(s)
azuredevops_project
Terraform Configuration Files
Debug Output
Gist_0
Gist_1
Expected Behavior
NOTE: This issue appears inconsistently. With the same Terraform configuration and the same commands, this configuration will sometimes apply and destroy as expected. Other-times not.
Applying this plan should consistently create a project under my organization in Azure Devops and consistently be tracked in the Terraform state.
Actual Behavior
NOTE: This issue appears inconsistently. With the same Terraform configuration and the same commands, this configuration will sometimes apply and destroy as expected. Other-times not.
Applying this plan led to Terraform throwing the error:
Error: Provider produced inconsistent result after apply
The project is created and viewable in the UI
When running
apply
a second time Terraform throws this error indicating it is not tracking the resource state:Error: Error creating project: TF200019: The following project already exists on the Azure DevOps Server: TEST_PROJECT_00. You cannot create a new project with the same name as an existing project. Provide a different name.
terraform destroy
(as expected) does not have any trackable resources to destroySteps to Reproduce
terraform apply
terraform apply
terraform destroy
References
Related issues:
Related PRs:
The text was updated successfully, but these errors were encountered: