Skip to content
This repository has been archived by the owner on Dec 9, 2020. It is now read-only.

Issue while creating basics resources with terraform #12

Open
ficofer opened this issue Jul 18, 2018 · 1 comment
Open

Issue while creating basics resources with terraform #12

ficofer opened this issue Jul 18, 2018 · 1 comment

Comments

@ficofer
Copy link

ficofer commented Jul 18, 2018

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:

  • softlayer_ssh_key

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
Copy link
Author

ficofer commented Jul 18, 2018

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant