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

DXCDT-506: Improved Resource Name Sanitation #837

Merged
merged 2 commits into from
Sep 7, 2023

Conversation

willvedd
Copy link
Contributor

@willvedd willvedd commented Sep 6, 2023

🔧 Changes

The sanitizeResourceName function was added in #794 and offered an initial pass at sanitizing exported TF resource names. This step is necessary to abide by Terraform restrictions and best practices.

This PR adds a few minor improvements over the existing iteration. Specifically:

  • Lower-casing all letters
  • Replacing spaces, dashes (-) and other special characters with underscores (_)
  • Trimming extraneous underscores at the beginning and end of names

📚 References

Related PR: #794

🔬 Testing

New test cases added, existing test cases altered. Manual verification testing.

📝 Checklist

  • All new/changed/fixed functionality is covered by tests (or N/A)
  • I have added documentation for all new/changed functionality (or N/A)

@willvedd willvedd requested a review from a team as a code owner September 6, 2023 21:14
@willvedd willvedd enabled auto-merge (squash) September 6, 2023 21:17
@willvedd willvedd merged commit da61765 into main Sep 7, 2023
@willvedd willvedd deleted the DXCDT-506-sanitize-exported-resource-name branch September 7, 2023 08:59
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.

2 participants