microsoft / terraform-provider-azuredevops

Terraform Azure DevOps provider
https://www.terraform.io/docs/providers/azuredevops/
MIT License
387 stars 278 forks source link

`azuredevops_git_repository` - terraform-provider-azuredevops_v1.1.1 crashes when a repository is not found #1101

Closed Douglas0n closed 4 months ago

Douglas0n commented 4 months ago

Community Note

Terraform (and Azure DevOps Provider) Version

Affected Resource(s)

Terraform Configuration Files

data "azuredevops_project" "project" {
  name = var.project
}

data "azuredevops_git_repository" "repo" {
  project_id = data.azuredevops_project.project.id
  name       = var.repo_name
}

Debug Output

https://gist.github.com/Douglas0n/c8c4118aaf218ec7ac9832c5d6bf9657

Panic Output

https://gist.github.com/Douglas0n/a1d26e5da98e43987708a58233392f45

Expected Behavior

Inform that the repository does not exist in the team project

Actual Behavior

Error: The terraform-provider-azuredevops_v1.1.1 plugin crashed!

Steps to Reproduce

  1. var.project = Any Azure DevOps Team Project
  2. var.repo_name = A repository not present in this Team Project
  3. terraform apply

References

xuzhang3 commented 4 months ago

@Douglas0n this issue has been fixed, will be available in the next version. Duplication issue #1063