https://github.com/nullstone-modules/gcp-gcs-access
Grants a GCP application access to a Google Cloud Storage bucket
https://github.com/nullstone-modules/gcp-gcs-access
Last synced: about 1 month ago
JSON representation
Grants a GCP application access to a Google Cloud Storage bucket
- Host: GitHub
- URL: https://github.com/nullstone-modules/gcp-gcs-access
- Owner: nullstone-modules
- License: mit
- Created: 2025-12-03T15:22:22.000Z (8 months ago)
- Default Branch: master
- Last Pushed: 2026-05-20T21:06:56.000Z (2 months ago)
- Last Synced: 2026-05-21T02:58:05.109Z (2 months ago)
- Language: HCL
- Size: 4.88 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# gcp-gcs-access
Grants a GCP application access to a Google Cloud Storage bucket.
## Cross-Project
If you attempt to grant access to a bucket in a different project, this module will apply without granting the necessary IAM permissions.
To finalize this access, you must manually grant access to the app's service account to the desired GCS bucket.
To do this, execute this the following command in the bucket's GCP project:
```shell
BUCKET_PROJECT="<'bucket_project' from gcs bucket outputs>"
BUCKET_NAME="<'bucket_name' from gcs bucket outputs>"
APP_SA_EMAIL="<'service_account_email' from app outputs>"
gcloud storage buckets add-iam-policy-binding gs://${BUCKET_NAME} \
--member=serviceAccount:${APP_SA_EMAIL} \
--role=roles/storage.objectAdmin
```