-
Notifications
You must be signed in to change notification settings - Fork 31
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
Allow customization of naming patterns for resources created with install.instance #126
Comments
Thanks Soren for sharing your requirements. I fully understand the scenario and it would be easy to implement (naming algorithm is in |
I would provide a default behaviour, with the old prefix and keep the command line arguments for the default users. |
I like the idea of a naming template I found four places where names are set // src\aggregator-cli\Instances\InstanceName.cs:9-10
const string resourceGroupPrefix = "aggregator-";
const string functionAppSuffix = "aggregator";
// src\aggregator-cli\Instances\instance-template.json:63
"storageAccountName": "[concat('aggregator', uniquestring(resourceGroup().id))]",
// src\aggregator-cli\Instances\AggregatorInstances.cs:189
string deploymentName = SdkContext.RandomResourceName("aggregator", 24);
// src\aggregator-cli\Mappings\AggregatorMappings.cs:41
&& s.ConsumerInputs.GetValue("url","").IndexOf("aggregator.azurewebsites.net") > 8); The first three set resource name while creating, so easy peasy. Looks doable |
I like the naming-template idea as well, and was definitely thinking a new command-line option, not a change to the existing one. I don't see any reason to change the default behavior to remove aggregator -- it's probably more helpful than anything for people who aren't in a complex enterprise environment. |
* refactor to support custom naming templates (ref #126) * cleaning Naming interface * refactored for custom naming template and initial set of unit tests * more unit tests * convert ARM template to use additional parameters * rename to better convey * fix ARM template sanity check * editorconfig, attributes and using clean-up * fixed implementation of FileNamingTemplates added more argument validation added unit tests * Integration test for naming template feature and some fixes and some doc notes * fix integration test cleanup should be moved to a special test command * factored out integration test cleanup that is delete all azure resources except for the resource group
Feature implemented in new 0.9.11 release. @sobjornstad, would you like to have a look? |
Will do! I just got back from vacation -- I'll try to have a look at it this week. |
This is looking good! I'm puzzled about one thing, though: even though Not hard to get around, but it doesn't make much sense to me. |
It is due to some assumption in some code. I will explore if I can get rid of those. |
Removed the limitation in 0.9.13. Now you can leave |
Released in 0.9.14 |
Feature Request
Is your feature request related to a problem? Please describe.
Our organization has standard naming conventions for resources in Azure. Being able to provide only a single resource name to prefix all the resources the Aggregator creates (functions app, storage account, App Insights, App Service plan) is not sufficient to meet these naming conventions, which require specific prefixes for each type of resource.
Describe the solution you would like
Add options to individually name each of the resources created by the installation, or at least to alter them after the fact and have further operations continue to work. While we're at it, removing the requirement to have
aggregator
suffixed to the name might be nice (this one isn't an issue for me, but it might bother others).Describe alternatives you have considered
I cannot think of any other way to solve this, but perhaps there would be some hacks possible if I knew more about how the Aggregator worked. Please let me know if you know of them.
The text was updated successfully, but these errors were encountered: