
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
arm-template-merge
Advanced tools
arm-template-merge
Azure Resource Manager (ARM) Template Merge
This tool merges multiple Azure Resource Manager (ARM) template files into a single template file.
Although linked templates may be used for combining multiple resources into a single deployment, they have some drawbacks:
Install the CLI globally:
npm install -g arm-template-merge
Then run arm-template-merge
without any arguments for details on its utilization.
Alternatively, you can execute the CLI without installing it by running:
npx arm-template-merge
You may add it to your project as a dependency:
npm install arm-template-merge
And use the merge functionality from your code:
const fs = require('fs');
const mergeARMTemplates = require('arm-template-merge');
let template1 = JSON.parse(fs.readFileSync('template1.json', 'utf8'));
let template2 = JSON.parse(fs.readFileSync('template2.json', 'utf8'));
let merged = {};
merged = mergeARMTemplates(merged, template1);
merged = mergeARMTemplates(merged, template2);
fs.writeFileSync('merged-template.json', JSON.stringify(merged), 'utf8');
The following rules are used for merging ARM template files:
All files MUST share the same exact values for the following fields:
$schema
contentVersion
apiProfile
(if present)All files' functions
and resources
collections will each be combined into a single collection. Objects within a collection that are exact copies will yield a single object in the merged collection:
[ | [ | [
{ <object-A> }, --|-------------------------|--> { <object-A> },
| { <object-B> }, --|--> { <object-B> },
{ <object-C> }, | { <object-C> }, | { <object-C> }
] | ] | ]
All files' parameters
, variables
and outputs
objects will each be combined into a single object. Files declaring the same key within an object MUST have the same exact value, or an error will be thrown:
{ | { | {
"A": <value-A>, --|-------------------------|--> "A": <value-A>,
| "B": <value-B>, --|--> "B": <value-B>,
"C": <value-C>, | "C": <value-C>, | "C": <value-C>
"D": <value-D1> | "D": <value-D2> | <<< ERROR >>>
} | } | }
Value and object equality follows Node.js' assert.deepStrictEqual()
rules.
FAQs
Azure Resource Manager (ARM) Template Merge
The npm package arm-template-merge receives a total of 180 weekly downloads. As such, arm-template-merge popularity was classified as not popular.
We found that arm-template-merge demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.