Received the error below using the most recent code available.
data.ibm_compute_ssh_key.public_key: Refreshing state...
Error: Error refreshing state: 1 error(s) occurred:
* data.ibm_compute_ssh_key.public_key: 1 error(s) occurred:
* data.ibm_compute_ssh_key.public_key: data.ibm_compute_ssh_key.public_key: Error retrieving SSH key: SoftLayer_Exception_Public: Access Denied. (HTTP 401)
I was able to fix this issue by updating the main.tf with:
provider "ibm" {
softlayer_username = "${var.sl_username}"
softlayer_api_key = "${var.sl_api_key}"
}
and the variables.tf with
variable "sl_username" { description = "IBM Cloud (aka SoftLayer) user name." }
variable "sl_api_key" { description = "IBM Cloud (aka SoftLayer) API key." }