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

Valid resource characters are being replaced by null label module. #147

Closed
perplexa opened this issue Oct 13, 2023 · 1 comment
Closed
Labels
enhancement New feature or request invalid This doesn't seem right wontfix This will not be worked on

Comments

@perplexa
Copy link

perplexa commented Oct 13, 2023

Found a bug? Maybe our Slack Community can help.

Slack Community

Describe the Bug

Valid resource character / is being replaced in ECR's name variable.

Expected Behavior

Valid resource character / is not being replaced in ECR's name variable.

Steps to Reproduce

Steps to reproduce the behavior:

  1. Use tfr:///cloudposse/ecr/aws//.?version=0.38.0 terraform module
  2. Set name a/b
  3. Name becomes ab

Edit: I added / manually to regex_replace_chars for the time being but it would be nice to change the default to include slashes. :)

@perplexa perplexa added the bug 🐛 An issue with the system label Oct 13, 2023
@Nuru Nuru added invalid This doesn't seem right wontfix This will not be worked on enhancement New feature or request and removed bug 🐛 An issue with the system labels Oct 3, 2024
@Nuru
Copy link
Contributor

Nuru commented Oct 3, 2024

Different resources have different naming restrictions. For example, S3 Bucket names can consist only of lowercase letters, numbers, dots (.), and hyphens (-). The default naming convention used by null-label is the most restrictive, so that it works for all AWS resources. If you don't like the default, you can easily modify the rules, as you discovered.

Changing the default risks massively impacting existing infrastructure and would require overriding the default in some use cases to avoid creating invalid resource names, which would cause Terraform to fail to create the resource. I am rejecting this PR to preserve the current behavior where null-label generates widely compatible AWS resource names and users and optionally modify inputs to generate richer, resource-specific names when desired.

@Nuru Nuru closed this as completed Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request invalid This doesn't seem right wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants