-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
google_notebooks_instance doesn't honor google_compute_instance_iam_member bindings for Notebook permissions #7236
Comments
@cm-wayfair when you say I The IAM policy appears to be created correctly via Terraform. To debug, you can create a custom role, add the |
Ok, I will try gcloud. Our policy is actually to systematically use custom roles. We only use built-in roles in limited cases. So I have tested both custom and built-in via Web Console. No, we don't generally apply iam.serviceAccounts.actAs in our custom roles. Only exception least privilege scenarios. In this case both testing with the custom role and built-in roles of compute.admin and notebooks.admin 'actAs' was not set. |
Our custom role has notebook.instances.stop. Our custom role basically mirrors the built-in role with the exception of *.setIam resource "google_organization_iam_custom_role" "tf-wf-ae-ent-notebook-manager" {
role_id = "tf_wf_ae_ent_notebook_manager"
org_id = "${data.google_organization.org.id}"
title = "AE notebook-manager manager entitlement"
description = "Give administrative access to notebooks"
permissions = [
"compute.acceleratorTypes.list",
"compute.diskTypes.list",
"compute.machineTypes.list",
"compute.subnetworks.list",
"notebooks.environments.create",
"notebooks.environments.delete",
"notebooks.environments.get",
"notebooks.environments.getIamPolicy",
"notebooks.environments.list",
"notebooks.instances.create",
"notebooks.instances.delete",
"notebooks.instances.get",
"notebooks.instances.getIamPolicy",
"notebooks.instances.list",
"notebooks.instances.update",
"notebooks.locations.get",
"notebooks.locations.list",
"notebooks.operations.cancel",
"notebooks.operations.delete",
"notebooks.operations.get",
"notebooks.operations.list",
"resourcemanager.projects.get",
"resourcemanager.projects.list",
"notebooks.instances.checkUpgradability",
"notebooks.instances.reset",
"notebooks.instances.setAccelerator",
"notebooks.instances.setLabels",
"notebooks.instances.setMachineType",
"notebooks.instances.start",
"notebooks.instances.stop",
"notebooks.instances.upgrade",
]
} |
@cm-wayfair you have both roles bond to google_compute_instance but not to google_notebooks_instance. Unfortunately there is no google_notebooks_instance_iam_member available yet. That is the one you should use. You can file an enhancement for that so it will be triaged. I m closing this issue then. Feel free to reopen it if you see a need to continue the conversation. Thank you |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks! |
Community Note
modular-magician
user, it is either in the process of being autogenerated, or is planned to be autogenerated soon. If an issue is assigned to a user, that user is claiming responsibility for the issue. If an issue is assigned tohashibot
, a community member has claimed the issue already.Terraform Version
Affected Resource(s)
Terraform Configuration Files
Debug Output
Panic Output
Expected Behavior
After applying the roles/notebooks.admin role at the instance level, I should be able to perform Notebook Admin permissions like notebooks.instances.stop.
However, applying roles/compute.admin to the Notebook instance at the instance level does allow me to perform compute.instances.stop, but only in a Compute Engine context.
The GCP documentation states that the Notebook roles/permissions can be applied at the Instance level.
https://cloud.google.com/iam/docs/understanding-roles#ai-notebooks-roles
This also affects any custom roles with notbook.* permissions.
Actual Behavior
Steps to Reproduce
Important Factoids
References
https://cloud.google.com/iam/docs/understanding-roles#ai-notebooks-roles
The text was updated successfully, but these errors were encountered: