microsoft / terraform-provider-azuredevops

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

Terraform fails at plan when an `azuredevops_git_repository` has been deleted outside of Terraform #1086

Closed camilo-s closed 5 months ago

camilo-s commented 5 months ago

Community Note

Terraform (and Azure DevOps Provider) Version

Terraform v1.8.5

Affected Resource(s)

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,
    ]
  }
}

Debug Output

2024-06-28T07:29:39.6540647Z ##[section]Starting: terraform plan
2024-06-28T07:29:39.6546026Z ==============================================================================
2024-06-28T07:29:39.6546196Z Task         : Bash
2024-06-28T07:29:39.6546271Z Description  : Run a Bash script on macOS, Linux, or Windows
2024-06-28T07:29:39.6546383Z Version      : 3.241.1
2024-06-28T07:29:39.6546478Z Author       : Microsoft Corporation
2024-06-28T07:29:39.6546568Z Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/utility/bash
2024-06-28T07:29:39.6546710Z ==============================================================================
2024-06-28T07:29:39.8403419Z Generating script.
2024-06-28T07:29:39.8422483Z ========================== Starting Command Output ===========================
2024-06-28T07:29:39.8435984Z [command]/usr/bin/bash /home/vsts/work/_temp/0f707d8c-7fa7-4143-aecc-c3297df75d5b.sh
2024-06-28T07:29:40.4838726Z 2024-06-28T07:29:40.482Z [INFO]  provider: configuring client automatic mTLS
2024-06-28T07:29:40.5001158Z 2024-06-28T07:29:40.499Z [DEBUG] provider: starting plugin: path=.terraform/providers/registry.terraform.io/microsoft/azuredevops/1.1.1/linux_amd64/terraform-provider-azuredevops_v1.1.1 args=[".terraform/providers/registry.terraform.io/microsoft/azuredevops/1.1.1/linux_amd64/terraform-provider-azuredevops_v1.1.1"]
2024-06-28T07:29:40.5006382Z 2024-06-28T07:29:40.499Z [DEBUG] provider: plugin started: path=.terraform/providers/registry.terraform.io/microsoft/azuredevops/1.1.1/linux_amd64/terraform-provider-azuredevops_v1.1.1 pid=1882
2024-06-28T07:29:40.5007556Z 2024-06-28T07:29:40.499Z [DEBUG] provider: waiting for RPC address: path=.terraform/providers/registry.terraform.io/microsoft/azuredevops/1.1.1/linux_amd64/terraform-provider-azuredevops_v1.1.1
2024-06-28T07:29:40.5123586Z 2024-06-28T07:29:40.511Z [INFO]  provider.terraform-provider-azuredevops_v1.1.1: configuring server automatic mTLS: timestamp=2024-06-28T07:29:40.511Z
2024-06-28T07:29:40.5394668Z 2024-06-28T07:29:40.538Z [DEBUG] provider: using plugin: version=5
2024-06-28T07:29:40.5396108Z 2024-06-28T07:29:40.539Z [DEBUG] provider.terraform-provider-azuredevops_v1.1.1: plugin address: address=/tmp/plugin3039032878 network=unix timestamp=2024-06-28T07:29:40.538Z
2024-06-28T07:29:40.5826310Z 2024-06-28T07:29:40.582Z [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = error reading from server: EOF"
2024-06-28T07:29:40.5854740Z 2024-06-28T07:29:40.583Z [DEBUG] provider: plugin process exited: path=.terraform/providers/registry.terraform.io/microsoft/azuredevops/1.1.1/linux_amd64/terraform-provider-azuredevops_v1.1.1 pid=1882
2024-06-28T07:29:40.5855335Z 2024-06-28T07:29:40.583Z [DEBUG] provider: plugin exited
2024-06-28T07:29:40.5935775Z 2024-06-28T07:29:40.593Z [INFO]  provider: configuring client automatic mTLS
2024-06-28T07:29:40.6012878Z 2024-06-28T07:29:40.600Z [DEBUG] provider: starting plugin: path=.terraform/providers/registry.terraform.io/microsoft/azuredevops/1.1.1/linux_amd64/terraform-provider-azuredevops_v1.1.1 args=[".terraform/providers/registry.terraform.io/microsoft/azuredevops/1.1.1/linux_amd64/terraform-provider-azuredevops_v1.1.1"]
2024-06-28T07:29:40.6018538Z 2024-06-28T07:29:40.601Z [DEBUG] provider: plugin started: path=.terraform/providers/registry.terraform.io/microsoft/azuredevops/1.1.1/linux_amd64/terraform-provider-azuredevops_v1.1.1 pid=1890
2024-06-28T07:29:40.6019589Z 2024-06-28T07:29:40.601Z [DEBUG] provider: waiting for RPC address: path=.terraform/providers/registry.terraform.io/microsoft/azuredevops/1.1.1/linux_amd64/terraform-provider-azuredevops_v1.1.1
2024-06-28T07:29:40.6109489Z 2024-06-28T07:29:40.610Z [INFO]  provider.terraform-provider-azuredevops_v1.1.1: configuring server automatic mTLS: timestamp=2024-06-28T07:29:40.610Z
2024-06-28T07:29:40.6384964Z 2024-06-28T07:29:40.638Z [DEBUG] provider: using plugin: version=5
2024-06-28T07:29:40.6410990Z 2024-06-28T07:29:40.638Z [DEBUG] provider.terraform-provider-azuredevops_v1.1.1: plugin address: address=/tmp/plugin548674596 network=unix timestamp=2024-06-28T07:29:40.637Z
2024-06-28T07:29:40.6918836Z 2024-06-28T07:29:40.691Z [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = error reading from server: EOF"
2024-06-28T07:29:40.6925058Z 2024-06-28T07:29:40.692Z [DEBUG] provider: plugin process exited: path=.terraform/providers/registry.terraform.io/microsoft/azuredevops/1.1.1/linux_amd64/terraform-provider-azuredevops_v1.1.1 pid=1890
2024-06-28T07:29:40.6925603Z 2024-06-28T07:29:40.692Z [DEBUG] provider: plugin exited
2024-06-28T07:29:40.7083156Z 2024-06-28T07:29:40.708Z [INFO]  provider: configuring client automatic mTLS
2024-06-28T07:29:40.7153969Z 2024-06-28T07:29:40.714Z [DEBUG] provider: starting plugin: path=.terraform/providers/registry.terraform.io/microsoft/azuredevops/1.1.1/linux_amd64/terraform-provider-azuredevops_v1.1.1 args=[".terraform/providers/registry.terraform.io/microsoft/azuredevops/1.1.1/linux_amd64/terraform-provider-azuredevops_v1.1.1"]
2024-06-28T07:29:40.7159826Z 2024-06-28T07:29:40.715Z [DEBUG] provider: plugin started: path=.terraform/providers/registry.terraform.io/microsoft/azuredevops/1.1.1/linux_amd64/terraform-provider-azuredevops_v1.1.1 pid=1897
2024-06-28T07:29:40.7160834Z 2024-06-28T07:29:40.715Z [DEBUG] provider: waiting for RPC address: path=.terraform/providers/registry.terraform.io/microsoft/azuredevops/1.1.1/linux_amd64/terraform-provider-azuredevops_v1.1.1
2024-06-28T07:29:40.7246217Z 2024-06-28T07:29:40.724Z [INFO]  provider.terraform-provider-azuredevops_v1.1.1: configuring server automatic mTLS: timestamp=2024-06-28T07:29:40.724Z
2024-06-28T07:29:40.7512128Z 2024-06-28T07:29:40.750Z [DEBUG] provider: using plugin: version=5
2024-06-28T07:29:40.7513330Z 2024-06-28T07:29:40.750Z [DEBUG] provider.terraform-provider-azuredevops_v1.1.1: plugin address: address=/tmp/plugin3874428670 network=unix timestamp=2024-06-28T07:29:40.750Z
2024-06-28T07:29:40.7836559Z data.terraform_remote_state.infrastructure: Reading...
2024-06-28T07:29:40.8174353Z 2024-06-28T07:29:40.816Z [INFO]  provider.terraform-provider-azuredevops_v1.1.1: 2024/06/28 07:29:40 [DEBUG] AzureRM Client User Agent: terraform-provider-azuredevops/v1.1.1 VSTS_56e1438d-6f54-4f95-8c3a-73627584faa5_build_2072_0: timestamp=2024-06-28T07:29:40.816Z
2024-06-28T07:29:41.0648104Z 2024-06-28T07:29:41.064Z [INFO]  provider.terraform-provider-azuredevops_v1.1.1: 2024/06/28 07:29:41 getAzdoClient(): Created core, build, operations, and serviceendpoint clients successfully!: timestamp=2024-06-28T07:29:41.064Z
2024-06-28T07:29:41.0661469Z data.azuredevops_project.this: Reading...
2024-06-28T07:29:41.1127508Z data.terraform_remote_state.infrastructure: Read complete after 0s
2024-06-28T07:29:41.3171751Z data.azuredevops_project.this: Read complete after 0s [id=<REDACTED>]
2024-06-28T07:29:41.3217988Z module.devops.azuredevops_variable_group.this[0]: Refreshing state... [id=<REDACTED>]
2024-06-28T07:29:41.3224181Z module.devops.azuredevops_git_repository.this[0]: Refreshing state... [id=<REDACTED>]
2024-06-28T07:29:41.4388005Z 2024-06-28T07:29:41.438Z [DEBUG] provider.terraform-provider-azuredevops_v1.1.1: panic: runtime error: invalid memory address or nil pointer dereference
2024-06-28T07:29:41.4392997Z 2024-06-28T07:29:41.439Z [DEBUG] provider.terraform-provider-azuredevops_v1.1.1: [signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0xc552f6]
2024-06-28T07:29:41.4397969Z 2024-06-28T07:29:41.439Z [DEBUG] provider.terraform-provider-azuredevops_v1.1.1
2024-06-28T07:29:41.4406134Z 2024-06-28T07:29:41.440Z [DEBUG] provider.terraform-provider-azuredevops_v1.1.1: goroutine 55 [running]:
2024-06-28T07:29:41.4406859Z 2024-06-28T07:29:41.440Z [DEBUG] provider.terraform-provider-azuredevops_v1.1.1: github.com/microsoft/terraform-provider-azuredevops/azuredevops/internal/service/git.flattenGitRepository(0xc0004d0480?, 0x0)
2024-06-28T07:29:41.4410363Z 2024-06-28T07:29:41.440Z [DEBUG] provider.terraform-provider-azuredevops_v1.1.1:   github.com/microsoft/terraform-provider-azuredevops/azuredevops/internal/service/git/resource_git_repository.go:452 +0x36
2024-06-28T07:29:41.4422934Z 2024-06-28T07:29:41.440Z [DEBUG] provider.terraform-provider-azuredevops_v1.1.1: github.com/microsoft/terraform-provider-azuredevops/azuredevops/internal/service/git.resourceGitRepositoryRead(0xc0004b5b80, {0xd85520?, 0xc0004d0480})
2024-06-28T07:29:41.4423737Z 2024-06-28T07:29:41.440Z [DEBUG] provider.terraform-provider-azuredevops_v1.1.1:   github.com/microsoft/terraform-provider-azuredevops/azuredevops/internal/service/git/resource_git_repository.go:261 +0x2aa
2024-06-28T07:29:41.4425290Z 2024-06-28T07:29:41.440Z [DEBUG] provider.terraform-provider-azuredevops_v1.1.1: github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).read(0x10c8ca0?, {0x10c8ca0?, 0xc0004dfb00?}, 0xd?, {0xd85520?, 0xc0004d0480?})
2024-06-28T07:29:41.4426252Z 2024-06-28T07:29:41.440Z [DEBUG] provider.terraform-provider-azuredevops_v1.1.1:   github.com/hashicorp/terraform-plugin-sdk/v2@v2.23.0/helper/schema/resource.go:712 +0x178
2024-06-28T07:29:41.4428775Z 2024-06-28T07:29:41.440Z [DEBUG] provider.terraform-provider-azuredevops_v1.1.1: github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).RefreshWithoutUpgrade(0xc0003fdea0, {0x10c8ca0, 0xc0004dfb00}, 0xc0000f3a00, {0xd85520, 0xc0004d0480})
2024-06-28T07:29:41.4430128Z 2024-06-28T07:29:41.440Z [DEBUG] provider.terraform-provider-azuredevops_v1.1.1:   github.com/hashicorp/terraform-plugin-sdk/v2@v2.23.0/helper/schema/resource.go:1015 +0x585
2024-06-28T07:29:41.4431016Z 2024-06-28T07:29:41.440Z [DEBUG] provider.terraform-provider-azuredevops_v1.1.1: github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ReadResource(0xc0003b8d38, {0x10c8ca0?, 0xc0004df980?}, 0xc000237e80)
2024-06-28T07:29:41.4432019Z 2024-06-28T07:29:41.440Z [DEBUG] provider.terraform-provider-azuredevops_v1.1.1:   github.com/hashicorp/terraform-plugin-sdk/v2@v2.23.0/helper/schema/grpc_provider.go:613 +0x497
2024-06-28T07:29:41.4433113Z 2024-06-28T07:29:41.440Z [DEBUG] provider.terraform-provider-azuredevops_v1.1.1: github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ReadResource(0xc000379180, {0x10c8ca0?, 0xc0004df1a0?}, 0xc00052c8a0)
2024-06-28T07:29:41.4433785Z 2024-06-28T07:29:41.440Z [DEBUG] provider.terraform-provider-azuredevops_v1.1.1:   github.com/hashicorp/terraform-plugin-go@v0.14.0/tfprotov5/tf5server/server.go:748 +0x49e
2024-06-28T07:29:41.4434601Z 2024-06-28T07:29:41.440Z [DEBUG] provider.terraform-provider-azuredevops_v1.1.1: github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ReadResource_Handler({0xf0bae0?, 0xc000379180}, {0x10c8ca0, 0xc0004df1a0}, 0xc00029a150, 0x0)
2024-06-28T07:29:41.4435332Z 2024-06-28T07:29:41.440Z [DEBUG] provider.terraform-provider-azuredevops_v1.1.1:   github.com/hashicorp/terraform-plugin-go@v0.14.0/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:349 +0x170
2024-06-28T07:29:41.4436061Z 2024-06-28T07:29:41.440Z [DEBUG] provider.terraform-provider-azuredevops_v1.1.1: google.golang.org/grpc.(*Server).processUnaryRPC(0xc0001fe1e0, {0x10cba40, 0xc000003860}, 0xc000534480, 0xc00040dec0, 0x166b610, 0x0)
2024-06-28T07:29:41.4436658Z 2024-06-28T07:29:41.440Z [DEBUG] provider.terraform-provider-azuredevops_v1.1.1:   google.golang.org/grpc@v1.56.3/server.go:1335 +0xde3
2024-06-28T07:29:41.4437284Z 2024-06-28T07:29:41.440Z [DEBUG] provider.terraform-provider-azuredevops_v1.1.1: google.golang.org/grpc.(*Server).handleStream(0xc0001fe1e0, {0x10cba40, 0xc000003860}, 0xc000534480, 0x0)
2024-06-28T07:29:41.4437830Z 2024-06-28T07:29:41.440Z [DEBUG] provider.terraform-provider-azuredevops_v1.1.1:   google.golang.org/grpc@v1.56.3/server.go:1712 +0xa1b
2024-06-28T07:29:41.4438355Z 2024-06-28T07:29:41.440Z [DEBUG] provider.terraform-provider-azuredevops_v1.1.1: google.golang.org/grpc.(*Server).serveStreams.func1.1()
2024-06-28T07:29:41.4438876Z 2024-06-28T07:29:41.440Z [DEBUG] provider.terraform-provider-azuredevops_v1.1.1:   google.golang.org/grpc@v1.56.3/server.go:947 +0xca
2024-06-28T07:29:41.4439685Z 2024-06-28T07:29:41.440Z [DEBUG] provider.terraform-provider-azuredevops_v1.1.1: created by google.golang.org/grpc.(*Server).serveStreams.func1
2024-06-28T07:29:41.4440213Z 2024-06-28T07:29:41.440Z [DEBUG] provider.terraform-provider-azuredevops_v1.1.1:   google.golang.org/grpc@v1.56.3/server.go:958 +0x15c
2024-06-28T07:29:41.4441090Z 2024-06-28T07:29:41.440Z [DEBUG] provider: plugin process exited: path=.terraform/providers/registry.terraform.io/microsoft/azuredevops/1.1.1/linux_amd64/terraform-provider-azuredevops_v1.1.1 pid=1897 error="exit status 2"
2024-06-28T07:29:41.4441729Z 2024-06-28T07:29:41.441Z [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = error reading from server: EOF"
2024-06-28T07:29:41.4802227Z 
2024-06-28T07:29:41.4803271Z Planning failed. Terraform encountered an error while generating this plan.
2024-06-28T07:29:41.4803479Z 
2024-06-28T07:29:41.4999957Z â•·
2024-06-28T07:29:41.5000350Z │ Error: Request cancelled
2024-06-28T07:29:41.5000707Z │ 
2024-06-28T07:29:41.5001036Z │   with module.devops.azuredevops_git_repository.this[0],
2024-06-28T07:29:41.5001448Z │   on ../modules/devops/main.tf line 9, in resource "azuredevops_git_repository" "this":
2024-06-28T07:29:41.5001830Z │    9: resource "azuredevops_git_repository" "this" {
2024-06-28T07:29:41.5002080Z │ 
2024-06-28T07:29:41.5002397Z │ The plugin.(*GRPCProvider).ReadResource request was cancelled.
2024-06-28T07:29:41.5002654Z ╵
2024-06-28T07:29:41.6059520Z 
2024-06-28T07:29:41.6060577Z Stack trace from the terraform-provider-azuredevops_v1.1.1 plugin:
2024-06-28T07:29:41.6060824Z 
2024-06-28T07:29:41.6062964Z panic: runtime error: invalid memory address or nil pointer dereference
2024-06-28T07:29:41.6063435Z [signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0xc552f6]
2024-06-28T07:29:41.6063819Z 
2024-06-28T07:29:41.6064238Z goroutine 55 [running]:
2024-06-28T07:29:41.6065468Z github.com/microsoft/terraform-provider-azuredevops/azuredevops/internal/service/git.flattenGitRepository(0xc0004d0480?, 0x0)
2024-06-28T07:29:41.6066112Z    github.com/microsoft/terraform-provider-azuredevops/azuredevops/internal/service/git/resource_git_repository.go:452 +0x36
2024-06-28T07:29:41.6066768Z github.com/microsoft/terraform-provider-azuredevops/azuredevops/internal/service/git.resourceGitRepositoryRead(0xc0004b5b80, {0xd85520?, 0xc0004d0480})
2024-06-28T07:29:41.6067382Z    github.com/microsoft/terraform-provider-azuredevops/azuredevops/internal/service/git/resource_git_repository.go:261 +0x2aa
2024-06-28T07:29:41.6068476Z github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).read(0x10c8ca0?, {0x10c8ca0?, 0xc0004dfb00?}, 0xd?, {0xd85520?, 0xc0004d0480?})
2024-06-28T07:29:41.6069174Z    github.com/hashicorp/terraform-plugin-sdk/v2@v2.23.0/helper/schema/resource.go:712 +0x178
2024-06-28T07:29:41.6070205Z github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).RefreshWithoutUpgrade(0xc0003fdea0, {0x10c8ca0, 0xc0004dfb00}, 0xc0000f3a00, {0xd85520, 0xc0004d0480})
2024-06-28T07:29:41.6071105Z    github.com/hashicorp/terraform-plugin-sdk/v2@v2.23.0/helper/schema/resource.go:1015 +0x585
2024-06-28T07:29:41.6071712Z github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ReadResource(0xc0003b8d38, {0x10c8ca0?, 0xc0004df980?}, 0xc000237e80)
2024-06-28T07:29:41.6073028Z    github.com/hashicorp/terraform-plugin-sdk/v2@v2.23.0/helper/schema/grpc_provider.go:613 +0x497
2024-06-28T07:29:41.6074528Z github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ReadResource(0xc000379180, {0x10c8ca0?, 0xc0004df1a0?}, 0xc00052c8a0)
2024-06-28T07:29:41.6075117Z    github.com/hashicorp/terraform-plugin-go@v0.14.0/tfprotov5/tf5server/server.go:748 +0x49e
2024-06-28T07:29:41.6076250Z github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ReadResource_Handler({0xf0bae0?, 0xc000379180}, {0x10c8ca0, 0xc0004df1a0}, 0xc00029a150, 0x0)
2024-06-28T07:29:41.6077215Z    github.com/hashicorp/terraform-plugin-go@v0.14.0/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:349 +0x170
2024-06-28T07:29:41.6077684Z google.golang.org/grpc.(*Server).processUnaryRPC(0xc0001fe1e0, {0x10cba40, 0xc000003860}, 0xc000534480, 0xc00040dec0, 0x166b610, 0x0)
2024-06-28T07:29:41.6078082Z    google.golang.org/grpc@v1.56.3/server.go:1335 +0xde3
2024-06-28T07:29:41.6078461Z google.golang.org/grpc.(*Server).handleStream(0xc0001fe1e0, {0x10cba40, 0xc000003860}, 0xc000534480, 0x0)
2024-06-28T07:29:41.6079377Z    google.golang.org/grpc@v1.56.3/server.go:1712 +0xa1b
2024-06-28T07:29:41.6079816Z google.golang.org/grpc.(*Server).serveStreams.func1.1()
2024-06-28T07:29:41.6080144Z    google.golang.org/grpc@v1.56.3/server.go:947 +0xca
2024-06-28T07:29:41.6080489Z created by google.golang.org/grpc.(*Server).serveStreams.func1
2024-06-28T07:29:41.6081098Z    google.golang.org/grpc@v1.56.3/server.go:958 +0x15c
2024-06-28T07:29:41.6081480Z 
2024-06-28T07:29:41.6081882Z Error: The terraform-provider-azuredevops_v1.1.1 plugin crashed!
2024-06-28T07:29:41.6082098Z 
2024-06-28T07:29:41.6082397Z This is always indicative of a bug within the plugin. It would be immensely
2024-06-28T07:29:41.6082867Z helpful if you could report the crash with the plugin's maintainers so that it
2024-06-28T07:29:41.6084330Z can be fixed. The output above should help diagnose the issue.
2024-06-28T07:29:41.6084750Z 
2024-06-28T07:29:41.6085513Z 2024-06-28T07:29:41.605Z [DEBUG] provider: plugin exited
2024-06-28T07:29:41.6114949Z 
2024-06-28T07:29:41.6179843Z ##[error]Bash exited with code '1'.
2024-06-28T07:29:41.6224327Z ##[section]Finishing: terraform plan

Panic Output

Expected Behavior

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.

Steps to Reproduce

  1. terraform plan
  2. terraform apply

Important Factoids

References