softlayer / terraform-provider-softlayer

a Terraform (http://terraform.io) provider for interacting with SoftLayer (https://www.softlayer.com)
Mozilla Public License 2.0
40 stars 26 forks source link

Updating the core on the virtual_guest throws SoftLayer_Exception_Order_InvalidData #157

Closed ashishth09 closed 7 years ago

ashishth09 commented 7 years ago

Core update always worked for me. I am not sure if this is some change in the SL API side. Let me know.

I was trying to update the core after the vm was created from 1->2

resource "softlayer_virtual_guest" "terraform-acceptance-test-1" {
    hostname = "ashishslprovider"
    domain = "uat.com"
    os_reference_code = "DEBIAN_7_64"
    datacenter = "wdc04"
    network_speed = 100
    hourly_billing = true
    private_network_only = false
    cores = 1
    memory = 1024
    disks = [25, 10, 20]
    dedicated_acct_host_only = true
    local_disk = false
    ipv6_enabled = true
    secondary_ip_count = 4
}

terraform apply works fine and the resource is created.

Change core from 1 to 2 like so and then apply

resource "softlayer_virtual_guest" "terraform-acceptance-test-1" {
    hostname = "ashishslprovider"
    domain = "uat.com"
    os_reference_code = "DEBIAN_7_64"
    datacenter = "wdc04"
    network_speed = 100
    hourly_billing = true
    private_network_only = false
    cores = 2
    memory = 1024
    disks = [25, 10, 20]
    dedicated_acct_host_only = true
    local_disk = false
    ipv6_enabled = true
    secondary_ip_count = 4
}

It gives me the below error:

softlayer_virtual_guest.terraform-acceptance-test-1: Refreshing state... (ID: 35093907)
softlayer_virtual_guest.terraform-acceptance-test-1: Modifying... (ID: 35093907)
  cores: "1" => "2"
softlayer_virtual_guest.terraform-acceptance-test-1: Still modifying... (ID: 35093907, 10s elapsed)
Error applying plan:

1 error(s) occurred:

* softlayer_virtual_guest.terraform-acceptance-test-1: 1 error(s) occurred:

* softlayer_virtual_guest.terraform-acceptance-test-1: Couldn't upgrade virtual guest: SoftLayer_Exception_Order_InvalidData: Invalid data on the order for property: prices. No pricing was found on a configuration. (HTTP 500)

Terraform does not automatically rollback in the face of errors.
Instead, your Terraform state file has been partially updated with
any resources that successfully completed. Please address the error
above and apply again to incrementally change your infrastructure.
ashishth09 commented 7 years ago

To add to that I used the latest release on this repo and terraform version 0.9.3