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

A demo/draft of spreadsheet code for asset management #700

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jack-r-warren
Copy link
Contributor

@jack-r-warren jack-r-warren commented Oct 31, 2024

I put a test spreadsheet in the shared drive: https://docs.google.com/spreadsheets/d/1isOybP49rb6n7uX2vtT_azKj-sgRzp7RWkOHxFSsSKE/edit?gid=591394540#gid=591394540

Idea is you paste that link in and it'll do the thing. For the "unique resource identifier", that'll need to be the full resource name you get from the cloud asset API. Sarah T said that because that full name is long and verbose, it'd be great to also have the tail end of it put in a separate short asset name column.

You'll need to set up ADC in a specific way for this to work.

gcloud auth application-default login --scopes=https://www.googleapis.com/auth/userinfo.email,https://www.googleapis.com/auth/accounts.reauth,https://www.googleapis.com/auth/userinfo.profile,https://www.googleapis.com/auth/sqlservice.login,openid,https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/calendar,https://www.googleapis.com/auth/spreadsheets

The calendar scope is helpful for Beehive's read-workbench-protection-calendar feature, while the spreadsheet scope is what powers this read-and-mutate-spreadsheet thingy. I don't think we'll need to explicitly list those scopes for Kubernetes or anything but you will need to enable the API in the project.

That cloud asset API is here https://pkg.go.dev/cloud.google.com/go/asset/apiv1. https://pkg.go.dev/cloud.google.com/go/asset/apiv1#Client.QueryAssets is probably what you want.

Copy link

sonarcloud bot commented Oct 31, 2024

Copy link

What's New


POST /api/asset-inventory/procedures/v3/generate

Generate an asset inventory

Copy link

Published image from 3fa324c (merge 1ced747):

us-central1-docker.pkg.dev/dsp-artifact-registry/sherlock/sherlock:v1.6.11-1ced747
us-central1-docker.pkg.dev/dsp-devops-super-prod/sherlock/sherlock:v1.6.11-1ced747

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant