Skip to content

Instantly share code, notes, and snippets.

@mvanholsteijn
mvanholsteijn / gcp-least-privileged
Last active October 22, 2022 11:09
lists all Google IAM roles which contain the specified permission sorted by the number of permissions
#!/bin/bash
#
# NAME
# gcp-least-privileged - lists all Google IAM roles which contain the specified permission
#
# EXAMPLE
# gcp-least-privileged compute.disks.delete
#
main() {
local permission