Skip to content

Commit 2e32a3a

Browse files
chore: Migrate gsutil usage to gcloud storage (#10217)
* chore: Migrate gsutil usage to gcloud storage * chore: update
1 parent cf55f68 commit 2e32a3a

File tree

4 files changed

+14
-14
lines changed

4 files changed

+14
-14
lines changed

dataflow/encryption-keys/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Additionally, for this sample you need the following:
2525

2626
```sh
2727
export BUCKET=your-gcs-bucket
28-
gsutil mb gs://$BUCKET
28+
gcloud storage buckets create gs://$BUCKET
2929
```
3030

3131
1. [Create a symmetric key ring](https://cloud.google.com/kms/docs/creating-keys).
@@ -151,10 +151,10 @@ To avoid incurring charges to your GCP account for the resources used:
151151

152152
```sh
153153
# Remove only the files created by this sample.
154-
gsutil -m rm -rf "gs://$BUCKET/samples/dataflow/kms"
154+
gcloud storage rm --recursive --continue-on-error "gs://$BUCKET/samples/dataflow/kms"
155155

156156
# [optional] Remove the Cloud Storage bucket.
157-
gsutil rb gs://$BUCKET
157+
gcloud storage buckets delete gs://$BUCKET
158158

159159
# Remove the BigQuery table.
160160
bq rm -f -t $PROJECT:$DATASET.$TABLE

dataflow/flex-templates/kafka_to_bigquery/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Additionally, for this sample you need the following:
3232

3333
```sh
3434
export BUCKET="your-gcs-bucket"
35-
gsutil mb gs://$BUCKET
35+
gcloud storage buckets create gs://$BUCKET
3636
```
3737

3838
1. Create a [BigQuery dataset](https://cloud.google.com/bigquery/docs/datasets).
@@ -381,7 +381,7 @@ The following sections describe how to delete or turn off these resources.
381381
1. Delete the template spec file from Cloud Storage.
382382
383383
```sh
384-
gsutil rm $TEMPLATE_PATH
384+
gcloud storage rm $TEMPLATE_PATH
385385
```
386386
387387
1. Delete the Flex Template container images from Container Registry.
@@ -439,5 +439,5 @@ The following sections describe how to delete or turn off these resources.
439439
> These objects cannot be recovered.
440440
>
441441
> ```sh
442-
> gsutil rm -r gs://$BUCKET
442+
> gcloud storage rm --recursive gs://$BUCKET
443443
> ```

dataflow/flex-templates/streaming_beam_sql/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Additionally, for this sample you need the following:
2525

2626
```sh
2727
export BUCKET="your-gcs-bucket"
28-
gsutil mb gs://$BUCKET
28+
gcloud storage buckets create gs://$BUCKET
2929
```
3030

3131
1. Create a
@@ -241,7 +241,7 @@ The following sections describe how to delete or turn off these resources.
241241
1. Delete the template spec file from Cloud Storage.
242242
243243
```sh
244-
gsutil rm $TEMPLATE_PATH
244+
gcloud storage rm $TEMPLATE_PATH
245245
```
246246
247247
1. Delete the Flex Template container image from Container Registry.
@@ -287,7 +287,7 @@ The following sections describe how to delete or turn off these resources.
287287
> These objects cannot be recovered.
288288
>
289289
> ```sh
290-
> gsutil rm -r gs://$BUCKET
290+
> gcloud storage rm --recursive gs://$BUCKET
291291
> ```
292292
293293
## Limitations

dataflow/templates/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Additionally, for this sample you need the following:
1818

1919
```sh
2020
export BUCKET=your-gcs-bucket
21-
gsutil mb gs://$BUCKET
21+
gcloud storage buckets create gs://$BUCKET
2222
```
2323

2424
1. Clone the `java-docs-samples` repository.
@@ -64,7 +64,7 @@ mvn compile exec:java \
6464
--runner=DataflowRunner"
6565

6666
# Upload the metadata file.
67-
gsutil cp WordCount_metadata "$TEMPLATE_LOCATION"_metadata
67+
gcloud storage cp WordCount_metadata "$TEMPLATE_LOCATION"_metadata
6868
```
6969

7070
> For more information, see
@@ -94,9 +94,9 @@ To avoid incurring charges to your GCP account for the resources used:
9494

9595
```bash
9696
# Remove only the files created by this sample.
97-
gsutil -m rm -rf "$TEMPLATE_LOCATION*"
98-
gsutil -m rm -rf "gs://$BUCKET/samples/dataflow/wordcount/"
97+
gcloud storage rm --recursive --continue-on-error "$TEMPLATE_LOCATION*"
98+
gcloud storage rm --recursive --continue-on-error "gs://$BUCKET/samples/dataflow/wordcount/"
9999

100100
# [optional] Remove the Cloud Storage bucket.
101-
gsutil rb gs://$BUCKET
101+
gcloud storage buckets delete gs://$BUCKET
102102
```

0 commit comments

Comments
 (0)