Azure / Azure/azure-quickstart-templates

[Feature Request] Overloading Parameter Files

Open
#5,876 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Bicep
Stars
14.9k
Forks
16.2k
Avg merge
6d 21h
Merged PRs (30d)
6

Description

### Issue Details

I'm part of DevOps/Infrastructure at my company. I'm relatively new to ARM templates, but picking them up fast.

We are trying to adhere to some [Best Practices](https://blogs.msdn.microsoft.com/mvpawardprogram/2018/05/01/azure-resource-manager/), and I've run into something that may be a helpful improvement.

Is it at all possible to allow the ARM engine to accept a parameter file with more parameters than what an ARM Template has defined?

Currently if you add a `parameter` to the parameter file that is not in the `"parameters" : {}` section of the ARM Template, the deployment will fail validation because of the _extra_ parameter.

### Current Execution

Currently, if you're doing a large number of ARM Templates as a part of a single application or deployment, your scenario is like below:

You create a large ARM Template for deployment of your application, possibly deploying dependent resources through linked templates or statically in the `"resources" : {}` section. These Resources, in turn, may have their own dependent resources linked or statically defined.

This requires:
* Well constructed Compose type Templates that pass parameter values to the Deploy templates
* or
* A parameter file for each Resource being deployed
* or
* Inline Parameters defined under `"properties" : { "parameters" : {} }` section in your `"resources" : {}`
* or
* One large statically crafted ARM Template
* or
* Some combination of the above items

### Use Case

Say I'm deploying a complete application ARM Template that has multiple VMs or SQL instances. If I create my own ARM Template and Linked Templates for deployment, I could name like parameters the same, such as Geo Location or Resource Name Prefix (assuming I have a well structured naming schema that would work in all templates, i.e. `Sub-Loc-ResourceType-ApplicationName`). I could then supply, in the same parameter file, parameters that only apply to one particular child or set of child resources. But all ARM Templates would refer back to this singular Parameter file.

In this execution, the parameter file for a large deployment may grow in size, housing all parameters needed for every Resource ARM Template in the deployment. However, it could actually reduce the `"parameters" : {}` section on many of the linked templates. This is due to parent Templates not needing to hold parameters that would need to be passed down to children Templates.

It would also simplify deployment by referencing a singular parameter file for the whole deployment versus parameter files per resource, or inline parameters.

The ARM Template Engine would only pull the Parameters from the Parameter File that are defined for that particular ARM Template, and skip all others.

Thanks

Contributor guide

No contributing guide indexed for this repository

Research direction

The issue names no repository files, tests, or entry points. First determine whether azure-quickstart-templates owns ARM parameter validation or whether this belongs to the Azure deployment engine. Done would require an agreed implementation location and tests showing that extra parameters are ignored while parameters defined by the template still work.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure
Domain
cloud, infrastructure
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.