NetApp / terraform-provider-netapp-elementsw

Support for Volume, Initiator, Account, and Volume Access Group resources.
Mozilla Public License 2.0
5 stars 6 forks source link

enable512e can't handle False value #6

Closed scaleoutsean closed 4 years ago

scaleoutsean commented 4 years ago

true works, false doesn't.

  # elementsw_volume.storage-volume[1] will be created
  + resource "elementsw_volume" "storage-volume" {
      + account    = (known after apply)
      + burst_iops = 1000
      + enable512e = false
      + id         = (known after apply)
      + iqn        = (known after apply)
      + max_iops   = 500
      + min_iops   = 100
      + name       = "netapp-trident-vol-1"
      + total_size = 107374182400
    }

Result:

elementsw_volume.storage-volume[1]: Creating...
2020/06/26 09:00:43 [ERROR] <root>: eval: *terraform.EvalApplyPost, err: enable512e argument is required
2020/06/26 09:00:43 [ERROR] <root>: eval: *terraform.EvalSequence, err: enable512e argument is required

Error: enable512e argument is required

  on main.tf line 9, in resource "elementsw_volume" "storage-volume":
   9: resource "elementsw_volume" storage-volume {

This part could be what causes problems, maybe thanks to changes in TF 0.12 (assuming it worked before).

terraform version
Terraform v0.12.26
+ provider.netapp-elementsw (unversioned)
lonico commented 4 years ago

yes, it;s an issue with:

    if v, ok := d.GetOk("enable512e"); ok {
        volume.Enable512E = v.(bool)
    } else {
        return fmt.Errorf("enable512e argument is required")
    }
lonico commented 4 years ago

fixed with 54b3e9cd586aa0512dd3551182ca202ff9c975ef