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
Add a name length check when using the filename to name an assignment. #1
Comments
Great feedback. Let me investigate what the best options are here. |
@GPugnet - I have validated with the Blueprint team that this specific limit is not an ARM limit but a limit imposed by the Blueprint feature. I'm working on adding some additional validation to ensure that if we hit this limit during import / export that we throw an error and terminate. Thanks for raising this up. Will be integrating a fix shortly and publish. |
LAST EDIT: January 04, 2019 - version 2.2 * Added ModuleMode to the parameters to allow for supporting AzureRM and Az module sets Thank you Florent APPOINTAIRE (@florent_app) for the feedback and additional inputs for supporting Az modules * Added validation that all blueprint and artifact names are less than or equal to the maximim of 48 characters Thank you for your great inputs on these updates Guillaume Pugnet (@PugnetGuillaume)! #1
@GPugnet could you please review the latest merged version to see if it supports the requirement? I have also added the ability to run the script on PS CORE with a moduleMode parameter so that you can leverage the Az versus AzureRM Module set. |
Validated character limit being honored and error thrown on failure. Closing this issue. |
Context :
When an assignment has no name, the script use the filename to generate the assignment name.
Then the name is used to generate the assignment ID.
Issue :
If the name exceeds a maximum length of 48, the API returns a (400) Bad Request.
The script does not provide details about the issue.
Suggested fix :
Add a control and raise an error when using a filename longer than 48 characters.
Display more details about the API errors. In this case, the API returns an explicit error message we could display :
The text was updated successfully, but these errors were encountered: