-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
[Bug]: Error: only alphanumeric characters and hyphens allowed in "name" #38165
Comments
Community NoteVoting for Prioritization
Volunteering to Work on This Issue
|
@EugenKon By definition, alphanumeric would only include 0-9, a-z, and A-Z. Along with |
@acwwat AFAIK all languages defines alphanumeric as By the way, why I can use
To my mind this is a bug that |
@EugenKon There certainly seems to be some inconsistencies within AWS, although the provider is technically somewhat adhering to the requirements. What I can see is that the Console is the only place where it provides the specifications for the event subscription name. As you can see in the screenshot, the spec is "alphanumeric" + hyphens with max 255 characters, although the error message spells it out more explicitly:
More notable is that the provider validation does not enforce the "must start with a letter" requirement. The API reference does not even mention the regex. For consistency, I can update the validation and the error message in the provider to match the UI which I consider to be the current source of truth (best we got today anyway). However the general issue of inconsistency and API reference accuracy are more of upstream AWS issues to be addressed. |
Hm... Probably AWS_Provider documentation for this resource should be updated to mention this limitation. Probably it would worth to mention this limitation and provide a link to AWS documentation which will describe this. Thus on Terraform Doc site we do not need to change anything, because it will just refer to AWS.
Yeah, AWS error message is more informative than from Terraform. |
Welp, there are apparently even more validation when I checked the error returned by the AWS API:
I feel that it's a fool's errand to update the validation code in the provider as I am sure there are many, many other cases in other AWS services, but nonetheless I'll try to fix just this one. |
Warning This issue has been closed, meaning that any additional comments are hard for our team to see. Please assume that the maintainers will not see them. Ongoing conversations amongst community members are welcome, however, the issue will be locked after 30 days. Moving conversations to another venue, such as the AWS Provider forum, is recommended. If you have additional concerns, please open a new issue, referencing this one where needed. |
This functionality has been released in v5.63.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you! |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Terraform Core Version
I do not remember already
AWS Provider Version
probably this happened on v4.67
Affected Resource(s)
Expected Behavior
No error should be reported, because the name has only alphanumeric characters.
Actual Behavior
Error: only alphanumeric characters and hyphens allowed in "name"
Relevant Error/Panic Output Snippet
Terraform Configuration Files
Steps to Reproduce
terraform plan
Debug Output
No response
Panic Output
No response
Important Factoids
No response
References
No response
Would you like to implement a fix?
None
The text was updated successfully, but these errors were encountered: