Search code examples
ibm-cloud-infrastructureibm-cloud-schematics

Softlayer Api Authentication with Terraform


I exported the SL_USERNAME and SL_API_KEY variables. I did not link my softlayer account to bluemix.

Command:

terraform import ibmcloud_infra_vlan.999 999

Error:

import ibmcloud_infra_vlan.999 result: 999: ibmcloud_infra_vlan.999: Error communicating with the API: SoftLayer_Exception_Public: Access Denied.  (HTTP 401)

Does this mean user doesn't have permission for API calls?


Solution

  • So username seems to be the API Username. Not the one you see in the users page.

    And VLAN ID is in the URL. https://control.softlayer.com/network/vlans/vlanid

    The same goes for all the other resource ID's.

    And you have to modify allowed IP's for the user you are using.