Skip to content
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

Unable to run terraform due to lack of permissions on custom roles #6673

Open
cblecker opened this issue Apr 8, 2024 · 2 comments
Open

Unable to run terraform due to lack of permissions on custom roles #6673

cblecker opened this issue Apr 8, 2024 · 2 comments
Labels
sig/k8s-infra Categorizes an issue or PR as relevant to SIG K8s Infra.

Comments

@cblecker
Copy link
Member

cblecker commented Apr 8, 2024

As a member of k8s-infra-prow-oncall@kubernetes.io, according to https://github.com/kubernetes/k8s.io/blob/main/infra/gcp/terraform/README.md I should be able to run terraform against the k8s-infra-prow-build-trusted project.

However, when I attempt to do so I get the following error:

│ Error: Error when reading or editing Error reading IAM Role organizations/758905017065/roles/iam.serviceAccountLister: googleapi: Error 403: You don't have permission to get the role at organizations/758905017065/roles/iam.serviceAccountLister.

It looks like because this custom role is associated with resources, but I don't have permissions to iam.roles.get it at the org level, I can't run terraform. Adding myself to org admin (#6671) allowed me to do the action. It sounds like we need to either A) discontinue use of this custom role, or B) allow permissions for folks that will be running terraform to iam.roles.get details of that role

@cblecker cblecker added the sig/k8s-infra Categorizes an issue or PR as relevant to SIG K8s Infra. label Apr 8, 2024
@cblecker
Copy link
Member Author

cblecker commented Apr 8, 2024

@BenTheElder
Copy link
Member

The IAM roles magic is somewhat impenetrable and causing other issues like #4981

Unfortunately I don't think anyone is terribly familiar with this OR has the bandwidth to replace it (versus continuing to migrate everything to community accounts so we can all sort this out together later ...)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sig/k8s-infra Categorizes an issue or PR as relevant to SIG K8s Infra.
Projects
None yet
Development

No branches or pull requests

2 participants