Skip to content

storage: fix pagination in force_destroy for google_storage_bucket#26164

Merged
modular-magician merged 1 commit intohashicorp:mainfrom
modular-magician:downstream-pr-9c00d86ea498b8674347ffa0828f579b588e250d
Feb 18, 2026
Merged

storage: fix pagination in force_destroy for google_storage_bucket#26164
modular-magician merged 1 commit intohashicorp:mainfrom
modular-magician:downstream-pr-9c00d86ea498b8674347ffa0828f579b588e250d

Conversation

@modular-magician
Copy link
Collaborator

Fixes #25999

This PR fixes a bug in google_storage_bucket where force_destroy = true failed for buckets with more than 1,000 objects.

RCA and solution details: #25999 (comment)

Key changes:

  • implemented NextPageToken pagination in the object listing loop.
  • Added a regression test TestAccStorageBucket_forceDestroy_largeObjectCount that creates 1,500 objects to verify the fix.
storage: fixed a bug in `google_storage_bucket` where `force_destroy = true` would fail to delete buckets with large number of objects due to missing pagination.

Derived from GoogleCloudPlatform/magic-modules#16355

…ashicorp#16355)

[upstream:9c00d86ea498b8674347ffa0828f579b588e250d]

Signed-off-by: Modular Magician <magic-modules@google.com>
@modular-magician modular-magician merged commit bf4f965 into hashicorp:main Feb 18, 2026
4 checks passed
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.

GCS bucket deletion bug

1 participant

Comments