{
    "api_version": "1",
    "kind": "dse_post",
    "self": "https://update.dsesecurity.com/api/v1/posts/dse-20260909-428-preserve-the-main-template-context-when-testing-one-arm-file/",
    "item": {
        "id": "https://update.dsesecurity.com/updates/dse-20260909-428-preserve-the-main-template-context-when-testing-one-arm-file/",
        "slug": "dse-20260909-428-preserve-the-main-template-context-when-testing-one-arm-file",
        "url": "https://update.dsesecurity.com/updates/dse-20260909-428-preserve-the-main-template-context-when-testing-one-arm-file/",
        "alternate_urls": {
            "markdown": "https://update.dsesecurity.com/updates/dse-20260909-428-preserve-the-main-template-context-when-testing-one-arm-file.md",
            "json": "https://update.dsesecurity.com/api/v1/posts/dse-20260909-428-preserve-the-main-template-context-when-testing-one-arm-file/"
        },
        "title": "Preserve the main-template context when testing one ARM file",
        "summary": "Does limiting an ARM toolkit run to one file remove its need for a recognized main template?",
        "format": {
            "slug": "guide",
            "name": "Guide"
        },
        "priority": {
            "slug": "info",
            "name": "Information"
        },
        "featured": false,
        "image": {
            "theme": "network-infrastructure",
            "label": "Networks & infrastructure",
            "alt": "Resilient network core with engineered blue and gold data paths.",
            "card_url": "https://update.dsesecurity.com/assets/editorial/network-infrastructure-card.webp?v=1.8.20",
            "hero_url": "https://update.dsesecurity.com/assets/editorial/network-infrastructure-hero.webp?v=1.8.20",
            "social_url": "https://update.dsesecurity.com/assets/editorial/network-infrastructure-social-v2.jpg?v=1.8.20",
            "width": 2400,
            "height": 1350
        },
        "topics": [
            {
                "slug": "it",
                "name": "IT",
                "url": "https://update.dsesecurity.com/topic/it/"
            },
            {
                "slug": "networks-infrastructure",
                "name": "Networks & Infrastructure",
                "url": "https://update.dsesecurity.com/topic/networks-infrastructure/"
            }
        ],
        "author": {
            "name": "DSE Security Editorial Team",
            "url": "https://update.dsesecurity.com/#editorial-team",
            "type": "Organization"
        },
        "publisher": {
            "name": "Detection Systems & Engineering",
            "url": "https://dsesecurity.com/"
        },
        "published_at": "2026-09-10T00:24:48+00:00",
        "modified_at": "2026-09-10T02:04:57+00:00",
        "reviewed_on": "2026-09-09",
        "reading_minutes": 2,
        "word_count": 243,
        "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.",
        "primary_source": {
            "name": "ARM template test toolkit - Azure Resource Manager | Microsoft Learn",
            "url": "https://learn.microsoft.com/en-us/azure/azure-resource-manager/templates/test-toolkit",
            "published_on": null,
            "authority": "Microsoft Learn"
        },
        "publishing_principles": "https://update.dsesecurity.com/updates/dse-updates-editorial-methodology/",
        "usage_info": "https://update.dsesecurity.com/usage/",
        "copyright_notice": "Copyright © 2026 Detection Systems & Engineering. All rights reserved.",
        "content_html": "<h2>Source facts</h2>\n<p>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. <a href=\"https://learn.microsoft.com/en-us/azure/azure-resource-manager/templates/test-toolkit\" target=\"_blank\" rel=\"noopener noreferrer\">Microsoft Learn</a>.</p>\n<h2>Applicability</h2>\n<p>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.</p>\n<h2>DSE recommendation</h2>\n<p>DSE recommends retaining the main template and the relevant package structure while running the focused test. Record the command&#8217;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.</p>\n<h2>Verification</h2>\n<p>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.</p>\n<h2>Official references</h2>\n<p><a href=\"https://learn.microsoft.com/en-us/azure/azure-resource-manager/templates/test-toolkit\" target=\"_blank\" rel=\"noopener noreferrer\">Microsoft Learn</a>. Source retrieved September 9, 2026.</p>",
        "content_text": "Source facts\nWith 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.\nApplicability\nUse 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.\nDSE recommendation\nDSE 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.\nVerification\nRun 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.\nOfficial references\nMicrosoft Learn. Source retrieved September 9, 2026.",
        "content_markdown": "## Source facts\n\nWith 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](https://learn.microsoft.com/en-us/azure/azure-resource-manager/templates/test-toolkit).\n\n## Applicability\n\nUse 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.\n\n## DSE recommendation\n\nDSE 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.\n\n## Verification\n\nRun 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.\n\n## Official references\n\n[Microsoft Learn](https://learn.microsoft.com/en-us/azure/azure-resource-manager/templates/test-toolkit). Source retrieved September 9, 2026."
    },
    "json_ld": {
        "@context": "https://schema.org",
        "@graph": [
            {
                "@type": "Organization",
                "@id": "https://dsesecurity.com/#organization",
                "name": "Detection Systems & Engineering",
                "alternateName": "DSE Security",
                "url": "https://dsesecurity.com/",
                "logo": {
                    "@type": "ImageObject",
                    "url": "https://update.dsesecurity.com/assets/dse-logo-20260812.png?v=1.8.20"
                }
            },
            {
                "@type": "Organization",
                "@id": "https://update.dsesecurity.com/#editorial-team",
                "name": "DSE Security Editorial Team",
                "url": "https://update.dsesecurity.com/",
                "parentOrganization": {
                    "@id": "https://dsesecurity.com/#organization"
                }
            },
            {
                "@type": "WebSite",
                "@id": "https://update.dsesecurity.com/#website",
                "name": "DSE Updates",
                "alternateName": "DSE Security Knowledge Hub",
                "url": "https://update.dsesecurity.com/",
                "inLanguage": "en-US",
                "publisher": {
                    "@id": "https://dsesecurity.com/#organization"
                },
                "potentialAction": {
                    "@type": "SearchAction",
                    "target": {
                        "@type": "EntryPoint",
                        "urlTemplate": "https://update.dsesecurity.com/?q={search_term_string}"
                    },
                    "query-input": "required name=search_term_string"
                }
            },
            {
                "@type": "WebPage",
                "@id": "https://update.dsesecurity.com/updates/dse-20260909-428-preserve-the-main-template-context-when-testing-one-arm-file/",
                "url": "https://update.dsesecurity.com/updates/dse-20260909-428-preserve-the-main-template-context-when-testing-one-arm-file/",
                "isPartOf": {
                    "@id": "https://update.dsesecurity.com/#website"
                },
                "lastReviewed": "2026-09-09"
            },
            {
                "@type": "BreadcrumbList",
                "@id": "https://update.dsesecurity.com/updates/dse-20260909-428-preserve-the-main-template-context-when-testing-one-arm-file/#breadcrumbs",
                "itemListElement": [
                    {
                        "@type": "ListItem",
                        "position": 1,
                        "name": "DSE Updates",
                        "item": "https://update.dsesecurity.com/"
                    },
                    {
                        "@type": "ListItem",
                        "position": 2,
                        "name": "Preserve the main-template context when testing one ARM file",
                        "item": "https://update.dsesecurity.com/updates/dse-20260909-428-preserve-the-main-template-context-when-testing-one-arm-file/"
                    }
                ]
            },
            {
                "@type": [
                    "Article",
                    "TechArticle"
                ],
                "@id": "https://update.dsesecurity.com/updates/dse-20260909-428-preserve-the-main-template-context-when-testing-one-arm-file/#article",
                "identifier": "https://update.dsesecurity.com/updates/dse-20260909-428-preserve-the-main-template-context-when-testing-one-arm-file/",
                "url": "https://update.dsesecurity.com/updates/dse-20260909-428-preserve-the-main-template-context-when-testing-one-arm-file/",
                "headline": "Preserve the main-template context when testing one ARM file",
                "description": "Does limiting an ARM toolkit run to one file remove its need for a recognized main template?",
                "abstract": "Does limiting an ARM toolkit run to one file remove its need for a recognized main template?",
                "articleBody": "Source facts\nWith 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.\nApplicability\nUse 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.\nDSE recommendation\nDSE 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.\nVerification\nRun 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.\nOfficial references\nMicrosoft Learn. Source retrieved September 9, 2026.",
                "datePublished": "2026-09-10T00:24:48+00:00",
                "dateModified": "2026-09-10T02:04:57+00:00",
                "mainEntityOfPage": {
                    "@id": "https://update.dsesecurity.com/updates/dse-20260909-428-preserve-the-main-template-context-when-testing-one-arm-file/"
                },
                "inLanguage": "en-US",
                "isAccessibleForFree": true,
                "author": {
                    "@type": "Organization",
                    "name": "DSE Security Editorial Team",
                    "url": "https://update.dsesecurity.com/#editorial-team"
                },
                "publisher": {
                    "@id": "https://dsesecurity.com/#organization"
                },
                "image": {
                    "@type": "ImageObject",
                    "@id": "https://update.dsesecurity.com/updates/dse-20260909-428-preserve-the-main-template-context-when-testing-one-arm-file/#primaryimage",
                    "url": "https://update.dsesecurity.com/assets/editorial/network-infrastructure-social-v2.jpg?v=1.8.20",
                    "contentUrl": "https://update.dsesecurity.com/assets/editorial/network-infrastructure-social-v2.jpg?v=1.8.20",
                    "width": 1200,
                    "height": 630,
                    "caption": "Preserve the main-template context when testing one ARM file"
                },
                "articleSection": [
                    "IT",
                    "Networks & Infrastructure"
                ],
                "keywords": [
                    "IT",
                    "Networks & Infrastructure",
                    "Guide",
                    "Information priority"
                ],
                "genre": "Guide",
                "about": [
                    {
                        "@type": "Thing",
                        "name": "IT",
                        "url": "https://update.dsesecurity.com/topic/it/"
                    },
                    {
                        "@type": "Thing",
                        "name": "Networks & Infrastructure",
                        "url": "https://update.dsesecurity.com/topic/networks-infrastructure/"
                    }
                ],
                "wordCount": 243,
                "timeRequired": "PT2M",
                "publishingPrinciples": "https://update.dsesecurity.com/updates/dse-updates-editorial-methodology/",
                "usageInfo": "https://update.dsesecurity.com/usage/",
                "copyrightHolder": {
                    "@id": "https://dsesecurity.com/#organization"
                },
                "copyrightNotice": "Copyright © 2026 Detection Systems & Engineering. All rights reserved.",
                "citation": {
                    "@type": "CreativeWork",
                    "name": "ARM template test toolkit - Azure Resource Manager | Microsoft Learn",
                    "url": "https://learn.microsoft.com/en-us/azure/azure-resource-manager/templates/test-toolkit"
                }
            }
        ]
    }
}