Is it possible to restrict only the delete GCE instance permission from a specific user for a specific instance?
I want this user to have the permissions for creating and editing a specific instance, but not to deleting.
Thanks in advance.
Is it possible to restrict only the delete GCE instance permission from a specific user for a specific instance?
I want this user to have the permissions for creating and editing a specific instance, but not to deleting.
Thanks in advance.
As you want to restrict delete permission only from a specific user, you can create a custom role following this document and restrict users who will be assigned that role from deleting by removing the permission to delete.
Also, it is possible to use compute engine IAM roles that are already defined and does not allow the user to delete the instance. However, this will give extra access which you might not want the user to have.
Keep in mind the above procedures will modify user access project wide. Thus, to grant an user access to one specific instance only; you can follow the below steps.
I hope this helps.