aimtool
aimtool copied to clipboard
Deployment error on long names for resource
Description
Orchestration and ports may have names not too short in a way that concatenating the application/msi name, the orchestration name, the port, etc may result in names that are too long to be used for resources in Azure. If there isn't a better way to handle this, I'd suggest the tool could return some kind of error or warning about the fact. With the current version the error goes by undetected until deployment to Azure.
Environment and tool versions
-
AIM Tool Version (aim --version): 0.5.1-beta.2020102844785
-
Windows Version (systeminfo): Win10
-
Shell: PowerShell
-
Shell Version ($PSVersionTable | bash --version):
PSVersion 7.1.3 PSEdition Core GitCommitId 7.1.3 OS Microsoft Windows 10.0.18363 Platform Win32NT PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…} PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1 WSManStackVersion 3.0
Repro steps
Run the tool on a MSI file from an application with long names for application name, orchestration, ports, etc.
Expected result
I'm not sure, but I think some resources cannot be renamed in Azure. If that's the case, the ideal solution here would be to warn so that renaming is done before deploying. If the long names could be edited or mapped to shorter names in a deployment parameter file or some config file that would work best. If not possible, as renaming on the source (BT) would involve the need for rerun the tool, this warning could be elevated to a fatal error.
Current result
Tool runs fine but an error is returned when trying to deploy to Azure.
Hi @eduardomb08. This was talked about during development. The issue at the time was that every Azure resource has its own naming limits, and these change over time. So we would need to build the list of limits into the tool, and then check the generated name against that limit. And then have a way to update the list periodically, if name limits change.
At a minimum, we could have a script (that executes before deployment) that scans the list of names for anything that will be too long. And then only this script would need to change if limits change. An alternative is to use the ARM verify feature, to check if a template is valid before actually performing the deployment.
Having said that, finding a way to shorten names that are over a certain length is something that would be helpful.
We'll have a look and see what can be done to improve the experience.
Thanks for pointing this out, and thanks for trying the tool.