Skip to content

Nuvalence/gptr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

GCP Permission-to-Roles Utility

Rather than sorting through Google's documentation to find a role that contains the permission you need, simply pass the permission as an argument to get the list of roles that contain that permission

gptr <some.google.iam-permission>

Example

╰─ gptr storage.hmacKeys.list
Owner (roles/owner)
Editor (roles/editor)
Viewer (roles/viewer)
Security Admin (roles/iam.securityAdmin)
Security Reviewer (roles/iam.securityReviewer)
Storage HMAC Key Admin (roles/storage.hmacKeyAdmin)

Build

Using the correct operating system paramters for your environment, run this command.

env GOOS=<your-os> GOARCH=<your-arch> go build -o bin/gptr-<your-os><version> cmd/gptr/main.go

Installation

The executable gptr-darwin0.0.1 in /bin is a go binary built for 64-bit mac. If you're using mac, rename to gptr and put on your path. Otherwise build using the instructions above and use the resulting binary.

Future Work

  • Implement fuzzy search
  • Tab completion
  • Dynamically update map when roles update

About

GCP Permission-to-Roles Utility

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages