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

Issue while creating basics resources with terraform #12

@ficofer

Description

@ficofer

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions