Please vote on this issue by adding a đź‘Ť reaction to the original issue to help the community and maintainers prioritize this request
Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
If you are interested in working on this issue or have submitted a pull request, please leave a comment
Terraform (and Azure DevOps Provider) Version
Terraform v1.8.5
Affected Resource(s)
azuredevops_git_repository
Terraform Configuration Files
# Copy-paste your Terraform configurations here - for large Terraform configs,
# please use a service like Dropbox and share a link to the ZIP file. For
# security, you can also encrypt the files using our GPG public key: https://keybase.io/hashicorp
resource "azuredevops_git_repository" "this" {
count = var.environment == "dev" ? 1 : 0
name = var.product_id
project_id = var.project_id
initialization {
init_type = "Uninitialized"
}
lifecycle {
ignore_changes = [
# Ignore changes to initialization to support importing existing repositories
# Given that a repo now exists, either imported into terraform state or created by terraform,
# we don't care for the configuration of initialization against the existing resource
initialization,
]
}
}
Terraform recognizes that the resource was deleted and plans for re-creating it, like so:
Terraform detected the following changes made outside of Terraform since the
last "terraform apply" which may have affected this plan:
# module.devops.azuredevops_git_repository.this[0] has been deleted
- resource "azuredevops_git_repository" "this" {
- default_branch = "refs/heads/master" -> null
- id = "<REDACTED>>" -> null
name = "<REDACTED>"
# (8 unchanged attributes hidden)
# (1 unchanged block hidden)
}
This is a regression, because provider azuredevops version v0.11.0 was able to do this.
Actual Behavior
terraform plan fails with the error message above.
Community Note
Terraform (and Azure DevOps Provider) Version
Terraform v1.8.5
Affected Resource(s)
azuredevops_git_repository
Terraform Configuration Files
Debug Output
Panic Output
Expected Behavior
Terraform recognizes that the resource was deleted and plans for re-creating it, like so:
This is a regression, because provider
azuredevops
versionv0.11.0
was able to do this.Actual Behavior
terraform plan
fails with the error message above.Steps to Reproduce
terraform plan
terraform apply
Important Factoids
References
0000