-
Notifications
You must be signed in to change notification settings - Fork 669
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ibm_container_vpc_alb resource does not honor IAM permissions correctly #2768
Comments
@wosteven Unlike API/CLI terraform is mainly used in doing an e2e automation.....As part of ibm_container_vpc_alb resource first we are making some set of calls to make sure cluster (worker) are in healthy state....
1)A call to retreive all worker pools assigned to a Cluster May be we need to confirm with IKS API team based on the incident ID why we need a Viewer role even if we have an Administrator role |
@hkantare from my perspective IKS permissions are very inconsistent. I guess the issue you see ("why we need a Viewer role") is that IKS wants an Account Wide Viewer Platform Role , so having Administator Platform role on the RG containing the cluster is not enough, but it should be enough. |
@wosteven OK...Can we take this up to IKS team ? |
@hkantare sure, if they need to fix this |
I suspect the authorization error is due to the Is it possible to pass the resource group id of the IKS cluster as a header to the enableAlb API via the container_vpc_alb TF resource? |
@rrpolanco I think its failing even before we are calling enable ALb API"s..It failing before that see the comments above |
@hkantare I suspect the reason it's failing is due to the
The reason I state this is if your cluster resource is in a non-default resource group and you have at least |
We are working on the fix.. |
We fixed the issue and added a optional argument The fix will be available in up coming release v1.35.0 |
Community Note
Terraform CLI and Terraform IBM Provider Version
Affected Resource(s)
ibm_container_vpc_alb
https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs/resources/container_vpc_alb
Terraform Configuration Files
Debug Output
https://gist.github.com/wosteven/6caeffef41dfa6498a0a889fd4310571
Panic Output
Expected Behavior
ALB enablement/disable should work as it also works with CLI with same user.
ibmcloud ks ingress alb enable vpc-gen2 --alb XXX -c YYY
Actual Behavior
TF fails with permission error:
Says "This action requires the Viewer role for the cluster in IBM Cloud Kubernetes Service." but user has "Administrator" Role on this cluster, he even created it.
Doing same task with same user via IBM Cloud CLI succeeds:
ibmcloud ks ingress alb enable vpc-gen2 --alb XXX -c YYY
As CLI works,we assume TF does check permissions differently/wrong.
Steps to Reproduce
Important Factoids
References
The text was updated successfully, but these errors were encountered: