What you need to know
Does limiting an ARM toolkit run to one file remove its need for a recognized main template?
Potentially affected
ARM JSON template packages tested with Test-AzTemplate and its File option.
DSE recommendation
DSE recommends retaining the main template and the relevant package structure while running the focused test.
Source facts
With TemplatePath, the ARM test toolkit identifies azuredeploy.json or maintemplate.json as the main template and examines other templates as linked templates. Selecting one file through the File option still requires that recognized main template in the folder. The toolkit targets ARM templates; Microsoft directs Bicep validation to the Bicep linter. Microsoft Learn.
Applicability
Use this check when narrowing a package test to investigate one template. Identify the package root, the recognized main file and the selected file explicitly. Do not treat an isolated JSON file copied into an unrelated directory as equivalent to the original package context.
DSE recommendation
DSE recommends retaining the main template and the relevant package structure while running the focused test. Record the command’s path and file selection with the result so a reviewer can distinguish a targeted diagnostic from a package-wide run. Keep the focused result separate from the complete validation required by the release process, and do not suppress a missing-context problem by simply omitting the test.
Verification
Run a controlled focused check from the intended package directory and verify which file the result names. Follow it with the appropriate full-package check, retaining the main-template revision and test selection for both. Confirm the validation tool matches the source format before interpreting a clean result. A successful focused test should be reported as that specific test, not as evidence that every template and supporting file was examined.
Official references
Microsoft Learn. Source retrieved September 9, 2026.
Review the official source
ARM template test toolkit - Azure Resource Manager | Microsoft Learn · Verified September 9, 2026
Need help applying this guidance safely?
DSE can help confirm applicability, protect service continuity, and validate the result across physical security and IT systems.
Talk with DSE