Open lantins opened 1 week ago
Some extra context, I've just tried the ibmcloud
CLI with a Resource Group
and it has the same error/issue.
I figured I could always call ibmcloud
using a null_resource
as a workaround for a short time, but it seems that isn't the case since I need the cluster to be part of a non-default Resource Group
.
FAILS:
$ ibmcloud target -g "chronicle - stage"
$ ibmcloud ks cluster create vpc-gen2 --name created-with-service-id --zone us-east-1 --vpc-id r014-d69c0c97-e542-451b-84db-864d9ae32386 --subnet-id 0757-eddfd4cb-8643-4ffd-87b4-1901f6d6a389 --flavor bx2.2x8
Creating cluster...
FAILED
Failed to create an API key with IAM. Revise your request and try again. (A03e9b)
Incident ID: e8ccc832-bb53-4cc1-8293-0ee1260f20e5
WORKS:
$ ibmcloud target -g ""
$ ibmcloud ks cluster create vpc-gen2 --name created-with-service-id --zone us-east-1 --vpc-id r014-d69c0c97-e542-451b-84db-864d9ae32386 --subnet-id 0757-eddfd4cb-8643-4ffd-87b4-1901f6d6a389 --flavor bx2.2x8
Creating cluster...
OK
Cluster created with ID crcdlr8w0oetmlrvp7j0
After a bit more digging, I think the only difference in requests to the API is if the X-Auth-Resource-Group
header is set.
So to me, this seems like its a IBM Cloud API 'backend' issue? rather than an issue with the Terraform Provider?
Community Note
Terraform CLI and Terraform IBM Provider Version
Affected Resource(s)
Terraform Configuration Files
Please include all Terraform configurations required to reproduce the bug. Bug reports without a functional reproduction may be closed without investigation.
Debug Output
https://gist.github.com/lantins/584b988cf401de3be6ca60e502d648a2
Panic Output
Expected Behavior
The IKS cluster should be created without error.
Actual Behavior
IKS cluster fails to be created, this seems related to using a non-default
Resource Group
(i.e. settingresource_group_id
). The error received is in relation to it trying to create acontainers-kubernetes-key
IAM User API Key and fails because I've used aService ID API Key
.Steps to Reproduce
Service ID
and create aAPI Key
associated with it.IBMCLOUD_API_KEY
to use theService ID API Key
.terraform apply
Important Factoids
When creating a IKS cluster using the
ibmcloud
CLI using aService ID API Key
it is able to create the cluster without any issues. It does not result in acontainers-kubernetes-key
or similar being created/saved anywhere as far as I can tell.References
0000