错误“softlayer_virtual_guest.my_server_1:创建虚拟客户机时出错:softlayer-go:无法使用SoftLayer_Virtual_Guest#createObject

时间:2016-05-25 07:40:48

标签: ibm-cloud-infrastructure terraform

我在应用softlayer时测试terraform我得到以下错误

在应用ssh密钥时会添加到softlayer,而环境不会创建时出现以下错误

softlayer_virtual_guest.my_server_1: Error creating virtual guest: softlayer-go: could not SoftLayer_Virtual_Guest#createObject, HTTP error code: '500'

需要帮助

3 个答案:

答案 0 :(得分:1)

我能够创建一个服务器,我使用的代码是:

provider "softlayer" {
username = "set me"
api_key = "set me"
}

# Virtual Server created with existing SSH Key already in SoftLayer \
# inventory and not created using this Terraform template.
resource "softlayer_virtual_guest" "my_server_1" {
    name = "rcvtest-11"
    domain = "softlayer.com"
    ssh_keys = ["269479"]
    image = "DEBIAN_7_64"
    region = "ams01"
    public_network_speed = 10
    cpu = 1
    ram = 1024
    local_disk = true
    hourly_billing = true

}

但是,如果您继续遇到此问题,可以在以下位置报告:

https://github.com/hashicorp/terraform/issues

答案 1 :(得分:0)

您可能会提供有关代码的更多信息,因为您使用“softlayer-go”作为客户端,了解您正在使用的这两个中的哪一个可能会很有用。
https://github.com/sudorandom/softlayer-go

https://github.com/maximilien/softlayer-go

答案 2 :(得分:0)

我有同样的问题,我可以通过运行找到根本原因:

TF_LOG=DEBUG terraform apply

它显示从SoftLayer的API

发回的HTTP响应