Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provider crashes while deleting transit gateway connections #1943

Closed
l2fprod opened this issue Oct 5, 2020 · 1 comment
Closed

Provider crashes while deleting transit gateway connections #1943

l2fprod opened this issue Oct 5, 2020 · 1 comment

Comments

@l2fprod
Copy link
Member

l2fprod commented Oct 5, 2020

Terraform Version

$ terraform version
Terraform v0.13.4
+ provider registry.terraform.io/ibm-cloud/ibm v1.13.0
68f842070ca9:~/mnt/home# uname -a
Linux 68f842070ca9 4.19.76-linuxkit #1 SMP Tue May 26 11:42:35 UTC 2020 x86_64 GNU/Linux
68f842070ca9:~/mnt/home# cat /etc/os-release
NAME="Alpine Linux"
ID=alpine
VERSION_ID=3.12.0
PRETTY_NAME="Alpine Linux v3.12"
HOME_URL="https://alpinelinux.org/"
BUG_REPORT_URL="https://bugs.alpinelinux.org/"
68f842070ca9:~/mnt/home#

Same behavior on mac OS 10.15.6

Affected Resource(s)

  • ibm_tg_gateway
  • ibm_tg_connection

Terraform Configuration Files

terraform {
  required_version = ">= 0.13.2"

  required_providers {
    ibm = {
      source = "IBM-Cloud/ibm"
      version = ">= 1.11.2"
    }
  }
}

variable ibmcloud_api_key {}
variable region {}
variable basename { default = "tg-delete" }
variable resource_group_name { default="Default" }
variable tags { default = [ "terraform" ] }

provider "ibm" {
  ibmcloud_api_key = var.ibmcloud_api_key
  region           = var.region
  generation       = 2
  ibmcloud_timeout = 900
}

data ibm_resource_group group {
  name = var.resource_group_name
}

locals {
  vpcnames = [
    "vpca",
    "vpcb",
    "vpcc",
    "vpcd"
  ]
}

resource ibm_is_vpc vpc {
  for_each = { for vpcname in local.vpcnames: vpcname => vpcname }
  name = "${var.basename}-${each.value}"
  resource_group = data.ibm_resource_group.group.id
}

resource ibm_tg_gateway transit_gateway {
  name           = "${var.basename}-tg"
  resource_group = data.ibm_resource_group.group.id
  location       = var.region
  global         = true
  tags           = var.tags
}

resource ibm_tg_connection vpc {
  for_each = { for vpcname in local.vpcnames: vpcname => vpcname }

  gateway      = ibm_tg_gateway.transit_gateway.id
  network_type = "vpc"
  name         = ibm_is_vpc.vpc[each.value].name
  network_id   = ibm_is_vpc.vpc[each.value].crn
}

Panic Output

https://gist.github.com/l2fprod/c80bba5b387bcebfae4f12d06d3298de

Expected Behavior

Destroy works with no crash

Actual Behavior

Crash during destroy

Steps to Reproduce

  1. terraform apply
  2. terraform destroy
    -> destroy crashes
hkantare added a commit to hkantare/terraform-provider-ibm that referenced this issue Oct 7, 2020
hkantare added a commit that referenced this issue Oct 7, 2020
@hkantare
Copy link
Collaborator

@hkantare hkantare closed this as completed Dec 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants