Home > Software engineering >  Terraform throwing issues while destroy - RPC Error
Terraform throwing issues while destroy - RPC Error

Time:10-27

We are getting RPC error while destroying the Azure resources from terraform script. Resources creating

  1. Resource Group
  2. Virtual Machines with Subnets
  3. AKS clusters
  4. Application Gateway

Please find the below screenshot for reference!

enter image description here

I have been trying to destroy resources through as they were created from terraform.

CodePudding user response:

To solve this rpc error: code = Unavailable desc = transport is closing these type errors will need self-contained reproduction cases.

Terraform CLI should drop a crash.log file in trace logs when a Terraform Provider crash unexpectedly. Mostly these are caused because of the timeout errors. Please try below steps

  1. az login --use-device-code
  2. terraform validate / terraform validate -var-file <.tfvar filename>
  3. terraform plan / terraform plan -var-file <.tfvar filename>****
  4. terraform apply /terraform apply -var-file <.tfvar filename>
  5. terraform destroy

NOTE: -var-file <tfvarfile> is not mandatory. Ignore step 4 if we are running only destroy process.

  • Related