bobtfish / terraform-provider-nsone

A terraform provider to manage zones/records/feeds in nsone
Apache License 2.0
17 stars 10 forks source link

resource nsone_user crashes when trying to set billing #18

Open sarguru opened 8 years ago

sarguru commented 8 years ago

For a sample resource which goes like

  resource "nsone_user" "test_sarguru" {
  name = "sarguru2"
  username = "sarguru99"
  email = "abc@xyz.com"
  notify {
    billing = true
  }
}

the terraform provider crashes with the following error.

!!!!!!!!!!!!!!!!!!!!!!!!!!! TERRAFORM CRASH !!!!!!!!!!!!!!!!!!!!!!!!!!!!
nsone_user.test_sarguru: Creating...
  email:          "" => "abc@xyz.com"
  name:           "" => "sarguru2"
  notify.#:       "0" => "1"
  notify.billing: "" => "1"
  username:       "" => "sarguru99"
Error applying plan:

1 error(s) occurred:

* nsone_user.test_sarguru: unexpected EOF
.
panic: interface conversion: interface is string, not bool

It seems to be because notify.billing: "" => "1" is rendered as a string rather than boolean for some reason.

sarguru commented 8 years ago

Relates to #16