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

Add permissions for secondary boot disk guide #893

Merged
merged 2 commits into from
Nov 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion tools/gke-disk-image-builder/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,20 @@ examples below to understand how this tool work better.
1. Compute Engine API must be enabled.
(https://console.developers.google.com/apis/api/compute.googleapis.com/overview?project=$PROJECT_NAME)
1. Verify that `$PROJECT_NUMBER-compute@developer.gserviceaccount.com` has
`storage.objectCreator` and `storage.objectViewer` permissions to the provided *GCS path* for the logs.
`storage.objectCreator` and `storage.objectViewer` permissions to the
provided *GCS path* for the logs and startup script.
You can run the following command to grant proper permissions for this:

```shell
gcloud storage buckets add-iam-policy-binding gs://$GCS_PATH \
--project=$PROJECT_NAME \
--member=serviceAccount:$PROJECT_NUMBER-compute@developer.gserviceaccount.com \
--role=roles/storage.objectCreator

gcloud storage buckets add-iam-policy-binding gs://$GCS_PATH \
--project=$PROJECT_NAME \
--member=serviceAccount:$PROJECT_NUMBER-compute@developer.gserviceaccount.com \
--role=roles/storage.objectViewer
```

1. If a disk image with the given name (via the **--image-name** flag) already
Expand Down