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

Importing vlan resource without a name crashes terraform #1067

Closed
chanster opened this issue Feb 4, 2020 · 3 comments
Closed

Importing vlan resource without a name crashes terraform #1067

chanster opened this issue Feb 4, 2020 · 3 comments

Comments

@chanster
Copy link

chanster commented Feb 4, 2020

Importing a ibm_network_vlan that does not have a name set fails.

Example of ibmcloud sl vlan list

ID        number   name           firewall   network_space   primary_router   hardware   virtual_servers   public_ips
2567033   3224     my-vlan1       No         PRIVATE         [REMOVED]        0          2                 61
2737798   3238     -              No         PRIVATE         [REMOVED]        0          4                 61

Terraform Version

Terraform v0.12.20

  • provider.ibm v1.1.0

Affected Resource(s)

  • ibm_network_vlan

Terraform Configuration Files

provider "ibm" {
  version = "~> 1.1"
}

data "ibm_network_vlan" "vlan_2737798" {
  id = 2737798
}

resource "ibm_network_vlan" "vlan_2737798" {
  id = data.ibm_network_vlan.vlan_2737798.id
}

Panic Output

https://gist.github.com/chanster/9401fd446ff7ef03ec78ada16dad1cad

Expected Behavior

Import of ibm_network_vlan should complete

Actual Behavior

Import fails with crash error.

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. Create a IBM Cloud Classic Infrastructure VLAN without a name.
  2. Create data source in Terraform config
  3. Create resource in Terraform config
  4. run terraform import ibm_network_vlan.[resource] [vlan_id]

Important Factoids

These VLANs were created manually through the IBM Cloud web interface.

Work around is to add a name to the VLAN after it has been created.

@hkantare
Copy link
Collaborator

hkantare commented Feb 5, 2020

We already have a fix in master branch
#1054

@hkantare
Copy link
Collaborator

hkantare commented Feb 5, 2020

It will be available in next release

@chanster
Copy link
Author

chanster commented Feb 5, 2020

Fixed in v1.2.0

@chanster chanster closed this as completed Feb 5, 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