Closed feliperfmarques closed 3 years ago
Its an issue from Kubernetes API as per their comments
This is due to an authentication error with IAM when the cluster create is trying to create an API key, because there is not one yet for the account in eu-gb. This is because IKS does not currently support service to service, so it is unable to create a user api key with a service id.
We have an epic for service to service support. https://bigblue.aha.io/features/SECADV-72
The customer could work around this by creating an api key in eu-gb targeting the resource group they want the cluster in ibmcloud ks api-key reset --region eu-gb
So you should have one user API key created in the region where you are provsioning the cluster
Helloooo,
Thanks so much @hkantare. You saved me!!! I would never discover it.
I’ll show you the steps I’ve followed for others who have the same issue, basically is what was reported above:
ibmcloud cli
with a user accountibmcloud target -g <resource-group-name>
ibmcloud ks api-key reset --region <cluster-region>
closing the issue based on above comments
Hi there,
I have been used terraform to provision infrastructure on IBM Cloud. For this, I have three terraform projects:
Initially, I manually created
admin
resource-group and service id and also setted policies for service id via IBM Cloud UI.Basically
admin
terraform project is used for: create global resources inadmin
resource group, create other resource-groups (prod
anddev
), create services ids(prod
anddev
), beyond to set policies for each service id.I configured IBM Cloud terraform provider using API key created for
admin
service id. Everything works fine in this project.In
prod
anddev
terraform projects, I wish to create practically identical resources for each environment, using following structure:prod
dev
I configured terraform provider using an API key created for
prod
anddev
service ids, the same way I did for theadmin
project. I can to provision practically all resources, with the exception of kubernetes service(iks module), because I got the following error:Below I am attaching the service policies setted in
admin
project for each service id, according official documentation.However, despite setting all the polices like the documentation says, I can't create the cluster. Any more policy is needed?
Terraform Version
Terraform v0.13.5 provider registry.terraform.io/ibm-cloud/ibm v1.16.1
Terraform Configuration Files
Affected Resource(s):
ibm_container_vpc_cluster
Steps to Reproduce
Actual Behavior
The resource is not created.
Expected Behavior
The resource should be created.
References
Access policies for kubernetes service:
https://cloud.ibm.com/docs/containers?topic=containers-access_reference&locale=pt-BR