|
1 | 1 | The Google Cloud Storage prerequisites: |
2 | 2 |
|
3 | | -- A Google Cloud Storage bucket URL, beginning with `gs://`. |
4 | | -- A Google Cloud service account key for Google Cloud Storage. The service account key must have at least the **Storage Object Viewer** role to ensure proper access permissions. [Create a service account key](https://cloud.google.com/iam/docs/keys-create-delete#creating). [Assign a role](https://cloud.google.com/storage/docs/access-control/iam). |
| 3 | +- A Google Cloud service account. [Create a service account](https://cloud.google.com/iam/docs/service-accounts-create#console). |
| 4 | +- A service account key for the service account. See [Create a service account key](https://cloud.google.com/iam/docs/keys-create-delete#creating) in |
| 5 | + [Create and delete service account keys](https://cloud.google.com/iam/docs/keys-create-delete). |
5 | 6 |
|
6 | | -[Learn more](https://cloud.google.com/storage/docs). |
| 7 | + To ensure maximum compatibility across Unstructured service offerings, you should give the service account key information to Unstructured as |
| 8 | + a single-line string that contains the contents of the downloaded service account key file (and not the service account key file itself). |
| 9 | + To print this single-line string without line breaks, suitable for copying, you can run one of the following commands from your Terminal or Command Prompt. |
| 10 | + In this command, replace `<path-to-downloaded-key-file>` with the path to the service account key file that you downloaded by following the preceding instructions. |
| 11 | + |
| 12 | + - For macOS or Linux: |
| 13 | + ```text |
| 14 | + tr -d '\n' < <path-to-downloaded-key-file> |
| 15 | + ``` |
| 16 | + - For Windows: |
| 17 | + ```text |
| 18 | + (Get-Content -Path "<path-to-downloaded-key-file>" -Raw).Replace("`r`n", "").Replace("`n", "") |
| 19 | + ``` |
| 20 | + |
| 21 | +- The URI for a Google Cloud Storage bucket. This URI consists of the target bucket name, plus any target folder within the bucket, expressed as `gs://<bucket-name>[/folder-name]`. [Create a bucket](https://cloud.google.com/storage/docs/creating-buckets#console). |
| 22 | + |
| 23 | + This bucket must have, at minimum, one of the following roles applied to the target Google Cloud service account: |
| 24 | + |
| 25 | + - `Storage Object Viewer` for bucket read access. |
| 26 | + - `Storage Object Creator` for bucket write access. |
| 27 | + - The `Storage Object Admin` role provides read and write access, plus access to additional bucket operations. |
| 28 | + |
| 29 | + To apply one of these roles to a service account for a bucket, see [Add a principal to a bucket-level policy](https://cloud.google.com/storage/docs/access-control/using-iam-permissions#bucket-add) |
| 30 | + in [Set and manage IAM policies on buckets](https://cloud.google.com/storage/docs/access-control/using-iam-permissions). |
0 commit comments