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

Updated 'getName' naming pattern requirements #73

Merged
merged 1 commit into from
Oct 2, 2023
Merged

Updated 'getName' naming pattern requirements #73

merged 1 commit into from
Oct 2, 2023

Conversation

QuinnGT
Copy link
Contributor

@QuinnGT QuinnGT commented Oct 2, 2023

Issue: #70
Title: Update getName Function to Adhere to Naming Requirements

Summary:

Updated the getName function in utils.ts to ensure generated names adhere to the new naming requirements.

Changes:

  1. Converted the generated name to lowercase.
  2. Removed any characters that are not a-z, 0-9, or hyphen.
  3. Trimmed hyphens from the start and end of the name.
  4. Ensured the name's length is between 3 and 28 characters.
  5. Checked that the name starts with a lowercase letter.
  6. Added error handling to provide clear feedback if the generated name doesn't meet the requirements.

Rationale:

The changes were made to comply with the naming requirements for AWS resources, ensuring that our infrastructure deployments do not encounter naming-related errors.

Testing:

Tested on local build with completion success at 9:50am PDT.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@QuinnGT QuinnGT marked this pull request as ready for review October 2, 2023 16:52
@bigadsoleiman
Copy link
Collaborator

Looks good to me. Adding @spugachev for an additional review.

@bigadsoleiman bigadsoleiman self-requested a review October 2, 2023 20:48
@spugachev spugachev merged commit 57a7afb into aws-samples:main Oct 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants