spotinst / terraform-provider-spotinst

Terraform Spotinst provider.
https://registry.terraform.io/providers/spotinst/spotinst/latest/docs
Mozilla Public License 2.0
63 stars 56 forks source link

elasticgroup set capacity blank in console when set to 0 in terraform #8

Closed k3ypad closed 6 years ago

k3ypad commented 7 years ago

Terraform Version

Terraform v0.10.7 (bug present in 0.9.X versions also)

Affected Resource(s)

Terraform Configuration Files

No custom config

Debug Output

Plan: https://gist.github.com/k3ypad/3661f9522724bffbb0acc3a42a9996f0 Apply: https://gist.github.com/k3ypad/f016f5f4df01f32ba94caf63ccb90db6

Panic Output

No panic.

Expected Behaviour

When this is specified:

  # Scale down on weeknights
  scheduled_task {
    task_type             = "scale"
    cron_expression       = "00 20 * * 1-5"
    scale_target_capacity = 0
    scale_min_capacity    = 0
    scale_max_capacity    = 0
  }

The elastigroup should have no instances at the specified time.

Actual Behavior

In the spotinst console the values for this scheduled action are blank. This also causes a input validation error in the console when you go to edit, despite Terraform planning and applying fine.

Steps to Reproduce

  1. Create an elastigroup with the above scheduled_task
  2. terraform plan
  3. terraform apply
  4. Go to the created elastigroup in the Spotinst web console
  5. Go to edit the configuration of the elastigroup in the Spotinst web console
  6. At the bottom of the general tab, expand "scheduling"
  7. This scheduled will have no values for target, minimum, and maximum - it will also display a "Fill at least one field" message.

Important Factoids

References

liranp commented 7 years ago

I can't reproduce this issue at the moment. It seems like PR #5 resolves this one as well. Could you please try again using a custom build of the provider (linux_amd64 | darwin_amd64 | windows_amd64)?

k3ypad commented 6 years ago

@liranp appears to work ok - thanks

liranp commented 6 years ago

Fixed as part of #12.