hashicorp / terraform-provider-softlayer

Terraform SoftLayer provider. Please note: This Terraform provider is archived per our provider archiving process: https://terraform.io/docs/internals/archiving.html
https://www.terraform.io/docs/providers/softlayer/
Mozilla Public License 2.0
1 stars 7 forks source link

Issue while creating basics resources with terraform #12

Open ficofer opened 5 years ago

ficofer commented 5 years ago

Hello Team,

I an finding the following error while trying to create a simple resource against softlayer provider.

* softlayer_ssh_key.ssh_sl_key: Error creating SSH Key: softlayer-go: could not SoftLayer_Security_Ssh_Key#createObject, HTTP error code: '401'

Terraform Version

Terraform v0.11.7

Affected Resource(s)

Please list the resources as a list, for example:

If this issue appears to affect multiple resources, it may be an issue with Terraform's core, so please mention this.

Terraform Configuration Files

provider "softlayer" {}

resource "softlayer_ssh_key" "ssh_sl_key" {
  name       = "ssh_sl_key"
  public_key = "XXX"
}

resource "softlayer_virtual_guest" "my_server" {
  name                 = "my_server_1"
  domain               = "example.com"
  ssh_keys             = ["${softlayer_ssh_key.ssh_sl_key.id}"]
  image                = "DEBIAN_7_64"
  region               = "ams01"
  public_network_speed = 10
  cpu                  = 1
  ram                  = 1024
  hourly_billing       = false
  local_disk           = false
}

Debug Output

Error: Error applying plan:

1 error(s) occurred:

* softlayer_ssh_key.ssh_sl_key: 1 error(s) occurred:

* softlayer_ssh_key.ssh_sl_key: Error creating SSH Key: softlayer-go: could not SoftLayer_Security_Ssh_Key#createObject, HTTP error code: '401'

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.
ficofer commented 5 years ago

No privilege issue confirmed, tested with a root access account.