IBM-Cloud / terraform-provider-ibm

https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs
Mozilla Public License 2.0
342 stars 673 forks source link

ibm_container_cluster - [bluemix_api_key not found] #334

Closed viveknangal closed 6 years ago

viveknangal commented 6 years ago

Issue is w.r.t lBM container resource, unable to create a K8s cluster , as it is reporting an error w.r.t my "bluemix_api_key" not found . Currently I m using my API Key for bluemix_api_key as I couldn't find an option to generate blue mix api keys separately.

Terraform Version

terraform -v Terraform v0.11.7

Affected Resource(s)

Terraform Configuration Files

provider "ibm" {
      softlayer_username = "username"
      bluemix_api_key ="XXXXXX"
    }
resource "ibm_container_cluster" "testacc_cluster" {
  name            = "terraform_dal13"
  datacenter      = "dal3"
  machine_type    = "u2c.2x4"
#  hardware        = "shared"
  public_vlan_id  = "XXXXXX"
  private_vlan_id = "XXX"
  worker_num      = 1
 account_guid= "XXXXX"
}

Expected Behavior

Kubernetes cluster should get created

Actual Behavior

Throwing below error 👎

Error: Error applying plan:

1 error(s) occurred:

* ibm_container_cluster.testacc_cluster: 1 error(s) occurred:

* ibm_container_cluster.testacc_cluster: Error occured while configuring Container Service for K8s cluster: "Request failed with status code: 400, BX0415EWQA: Provided API key could not be found"

Steps to Reproduce

  1. terraform apply
hkantare commented 6 years ago

Are you able to create cluster using same API key via Bluemix cli. Can you please enable terraform log and share us the complete output. export TF_LOG=debug and then terraform apply command.

viveknangal commented 6 years ago

I'm able to create the cluster by creating Platform API Key which was not aware of earlier. I was using softlayer_api_key , I realised to create any bluemix related service we have to use the separate key i.e Platform API Key .

hkantare commented 6 years ago

Thanks. Can you please close the issue if its working as expected.