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

fixed bucket name validation #12248

Conversation

modular-magician
Copy link
Collaborator

Fixes #12226

Rewrote validation logic and added much-needed unit testing. Invalid cases were tested against the API

Requirements implemented:

  • Bucket names can only contain lowercase letters, numeric characters, dashes (-), underscores (_), and dots (.). Spaces are not allowed.
  • Bucket names must start and end with a number or letter.
  • Bucket names must contain 3-63 characters. Names containing dots can contain up to 222 characters, but each dot-separated component can be no longer than 63 characters.
  • Bucket names cannot begin with the "goog" prefix.
  • Bucket names cannot contain "google"

NOT implemented:

  • Names containing dots require verification.
  • Bucket names cannot be represented as an IP address in dotted-decimal notation (for example, 192.168.5.4).
  • Bucket names cannot contain close misspellings of "google", such as "g00gle".

Release Note Template for Downstream PRs (will be copied)

storage: fixed a bug in `google_storage_bucket` where `name` was incorrectly validated.

Derived from GoogleCloudPlatform/magic-modules#6353

@github-actions
Copy link

github-actions bot commented Sep 3, 2022

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 3, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

google_storage_bucket name does not validate correctly
1 participant