इसे छोड़कर कंटेंट पर जाएं
AggregaAggregaAggregaAggrega
भाषा चुने: हिन्दी
इस पेज का मशीन अनुवाद किया गया है। मूल अंग्रेज़ी पढ़ें।

Azure Resource Manager टेम्पलेट इम्पोर्ट करें

यह मार्गदर्शिका एक छोटा Azure Resource Manager टेम्पलेट इम्पोर्ट करती है — Azure Verified Modules मॉड्यूल के ज़रिए डिप्लॉय किया गया एक Event Hubs नेमस्पेस, एक कंटेनर चलाने वाली App Service साइट, एक स्टैटिक वेब ऐप और वह वर्चुअल नेटवर्क जिसमें साइट को जुड़ना है — और नतीजे को एक Azure Resource Manager टेम्पलेट के रूप में बिल्ड करती है। इम्पोर्ट Aggregate, Release और Manifest ड्राफ़्ट करता है: नेमस्पेस और साइट स्टैंडर्ड लाइब्रेरी के Components के संदर्भ बन जाते हैं, स्टैटिक वेब ऐप, जिसके लिए कोई Component नहीं है, टेम्पलेट से ड्राफ़्ट किया जाता है, और टेम्पलेट जो मान उस रूप में बताता है जिसे Release ले सके, वे ले जाए जाते हैं। कुछ मान जिन्हें टेम्पलेट उस रूप में नहीं बताता, आपके लिए छोड़ दिए जाते हैं, और पेज दिखाता है कि कौन-से और कहाँ। नीचे की हर फ़ाइल और आउटपुट का हर ब्लॉक एक असली रन से आता है; टेम्पलेट और मार्गदर्शिका का हर चरण import-arm उदाहरण में है, जहाँ एक चेक स्क्रिप्ट इम्पोर्ट को फिर से चलाती है, जो वह लिखता है, जो वह प्रिंट करता है और जिन ब्लॉक को यह पेज उद्धृत करता है उनकी तुलना वहाँ रखी फ़ाइलों से करती है, पुष्टि करती है कि ड्राफ़्ट वहीं रुकता है जहाँ यह पेज कहता है, और समीक्षा किया हुआ Release बिल्ड करती है।

उदाहरण ड्राफ़्ट करें

आप यह इम्पोर्ट इस पेज के कमांडों से चला सकते हैं, या इसे अपने AI असिस्टेंट से चलवा सकते हैं।

उदाहरण को उसी के नाम वाले एक नए फ़ोल्डर में लिखें:

Terminal window
aggrega draft --example import-arm

फिर यह आगे चलाने के लिए कमांड प्रिंट करता है। पहला कमांड नए फ़ोल्डर में ले जाता है; उसके बाद वाला, नीचे दिया गया, उसके source फ़ोल्डर में ले जाता है, जिसमें वह है जिसे यह पेज इम्पोर्ट करता है और जहाँ इम्पोर्ट चलता है:

Terminal window
cd import-arm

टेम्पलेट

main.json टेम्पलेट का कंपाइल किया हुआ रूप है: वह JSON जो Bicep बिल्ड लिखता है और जिसे Azure Resource Manager डिप्लॉय करता है। इसका पैरामीटर रीजन है, और यह एक वर्चुअल नेटवर्क से शुरू होता है जिसमें वह सबनेट है जिससे साइट जुड़ती है:

{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"location": {
"type": "string",
"defaultValue": "westeurope"
}
},
"resources": [
{
"type": "Microsoft.Network/virtualNetworks",
"apiVersion": "2023-11-01",
"name": "vnet-notes",
"location": "[parameters('location')]",
"properties": {
"addressSpace": {
"addressPrefixes": [
"10.20.0.0/16"
]
},
"subnets": [
{
"name": "snet-app",
"properties": {
"addressPrefix": "10.20.1.0/24",
"delegations": [
{
"name": "web",
"properties": {
"serviceName": "Microsoft.Web/serverFarms"
}
}
]
}
}
]
}
},
[… omitted: the rest of the template]

नेमस्पेस Azure Verified Modules मॉड्यूल avm/res/event-hub/namespace के ज़रिए 0.15.3 पर डिप्लॉय किया गया है: एक Microsoft.Resources/deployments रिसोर्स जिसके template सदस्य में मॉड्यूल का अपना कंपाइल किया हुआ टेम्पलेट है, उसकी 3,700 से अधिक पंक्तियाँ, और जिसके parameters वे हैं जो टेम्पलेट मॉड्यूल के लिए सेट करता है:

{
"type": "Microsoft.Resources/deployments",
"apiVersion": "2022-09-01",
"name": "ehModule",
"properties": {
"mode": "Incremental",
"expressionEvaluationOptions": {
"scope": "inner"
},
"parameters": {
"name": {
"value": "evh-notes"
},
"location": {
"value": "[parameters('location')]"
},
"skuName": {
"value": "Standard"
},
"skuCapacity": {
"value": 2
},
"publicNetworkAccess": {
"value": "Enabled"
},
"enableTelemetry": {
"value": true
}
},
"template": {
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
[… omitted: the module's compiled template, and the rest of the resource]

मॉड्यूल का कंपाइल किया हुआ टेम्पलेट वही है जो Microsoft Container Registry उस संस्करण के लिए परोसती है, MIT लाइसेंस के तहत, और उदाहरण का README में नोटिस दिया गया है। इम्पोर्ट इसे मॉड्यूल को पहचानने के लिए पढ़ता है: इसका टेलीमेट्री प्रीफ़िक्स और संस्करण Azure Verified Modules मॉड्यूल और उसके द्वारा डिप्लॉय किए जाने वाले रिसोर्स टाइप का नाम देते हैं।

साइट एक सामान्य रिसोर्स है। यह पहले से मौजूद एक App Service प्लान पर चलती है, टेम्पलेट के सबनेट से जुड़ती है, linuxFxVersion में बताया गया कंटेनर चलाती है, मॉड्यूल का name आउटपुट पढ़ती है और एक और वेरिएबल सेट करती है:

{
"type": "Microsoft.Web/sites",
"apiVersion": "2023-12-01",
"name": "notes-api",
"location": "[parameters('location')]",
"kind": "app,linux,container",
"dependsOn": [
"[resourceId('Microsoft.Resources/deployments', 'ehModule')]",
"[resourceId('Microsoft.Network/virtualNetworks', 'vnet-notes')]"
],
"properties": {
"serverFarmId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/notes-platform/providers/Microsoft.Web/serverfarms/plan-notes",
"virtualNetworkSubnetId": "[resourceId('Microsoft.Network/virtualNetworks/subnets', 'vnet-notes', 'snet-app')]",
"siteConfig": {
"linuxFxVersion": "DOCKER|ghcr.io/example/notes-api:2.3.0",
"appSettings": [
{
"name": "EVENTHUB_NAMESPACE",
"value": "[reference('ehModule').outputs.name.value]"
},
{
"name": "EVENTHUB_NAME",
"value": "notes"
}
]
}
}
},

स्टैटिक वेब ऐप भी एक सामान्य रिसोर्स है। टेम्पलेट के बगल में एक पैरामीटर फ़ाइल एकमात्र पैरामीटर देती है:

{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"location": { "value": "northeurope" }
}
}

दोनों फ़ाइलें notes फ़ोल्डर में हैं, और उस फ़ोल्डर के बगल की एक .aggrega-config.yaml डायरेक्टरी को वर्कस्पेस बना देती है, इसलिए इम्पोर्ट अपने ड्राफ़्ट वहीं लिखता है:

# The workspace key marks this directory as the workspace root, so an import run
# here writes its drafts beside the notes folder.
workspace: {}
# The registry the importer is fetched from the first time an import needs it.
default_registry: hub.aggrega.ai

इम्पोर्ट टेम्पलेट और उसकी पैरामीटर फ़ाइल को टिप्पणियों वाले JSON के रूप में पढ़ता है, टेम्पलेट को उसके $schema और resources से पहचानता है, और पैरामीटर फ़ाइल को उसके $schema और parameters से। यह हर रिसोर्स को वर्कस्पेस के कैटलॉग के Components से तौलता है, जिसे वह वैसे पढ़ता है जैसा इम्पोर्ट कैसे चलता है बताता है, और यह कोई क्लाउड खाता नहीं पढ़ता: जिस मान की गणना टेम्पलेट डिप्लॉय होते समय करता है, उसे उसी एक्सप्रेशन के रूप में रखा जाता है जो उसकी गणना करता है, कभी खोजा नहीं जाता।

source में जाएँ:

Terminal window
cd source

इम्पोर्ट चलाएं

टेम्पलेट रखने वाले फ़ोल्डर का नाम दें। इम्पोर्टर टेम्पलेट और उसकी पैरामीटर फ़ाइल को उनकी सामग्री से पहचानता है:

Terminal window
aggrega import notes

कोई --target नहीं दिया गया है। इम्पोर्टर arm को अपना डिफ़ॉल्ट लक्ष्य घोषित करता है, क्योंकि Azure Resource Manager के लिए स्टैंडर्ड लाइब्रेरी के Recipes उसी से जुड़ते हैं, और इम्पोर्ट उसके लिए Manifest ड्राफ़्ट करता है; --target से कोई लक्ष्य बताने वाला इम्पोर्ट उसके बजाय उसी लक्ष्य के लिए ड्राफ़्ट करता है। इम्पोर्ट अपने ड्राफ़्ट के बगल में जो रिकॉर्ड लिखता है वह लक्ष्य को रखता है, और --sync उसे दोबारा इस्तेमाल करता है।

स्टैंडर्ड आउटपुट पर यह सूची देता है कि इसने क्या लिखा:

wrote aggregate.yaml
wrote release.yaml
wrote manifest.yaml
wrote catalog/component/imported/compute/microsoft-web-staticsites/0.1.0/component.yaml
wrote catalog/recipe/arm/microsoft-web-staticsites/0.1.0/recipe.yaml
wrote .aggrega-import.json

स्टैंडर्ड एरर पर, जहाँ <workspace> उस फ़ोल्डर के स्थान पर है जिसमें आपने इसे चलाया:

[… omitted: a warning that the importer runs unverified, printed where its module is read from beside its Plugin entity in a catalog folder rather than fetched]
read as the arm format, with drafted paths relative to <workspace>
info: the drafts are for the target "arm", the importer's declared default; an import naming a target drafts for that one
info: ehmodule deploys the Azure Verified Modules resource module avm/res/event-hub/namespace, of telemetry prefix 46d3xbcp.res.962075c, version 0.15.3, named "Event Hub Namespaces" in its metadata: it is one node of the resource type Microsoft.EventHub/namespaces, the parameters it sets read as the module's, and the module's telemetry is not carried, as whether a Recipe sends telemetry is the Recipe's to set
warn: notes-api sets the variable EVENTHUB_NAMESPACE at properties.siteConfig.appSettings.0.value from ehmodule's outputs.name.value, and the drafted Aggregate does not wire it: ehmodule publishes no provides key for it; the instance notes-api is connected to ehmodule for the dependency alone, a comment above the connection saying why; write the value where the instance is configured
info: the resource notes-site of the type Microsoft.Web/staticSites@2023-01-01 is drafted from the source as the Component imported/compute/microsoft-web-staticsites and the Recipe microsoft-web-staticsites on arm, carrying the properties the source writes; the decision's swap hint names the import drafting it from the vendor's schema
warn: the source creates substrate the draft leaves to the operator and drafts nothing for: vnet-notes (Microsoft.Network/virtualNetworks), of which the format says the network a component runs in is the operator's: a component of the catalog takes it by its resource ID under infra.overrides, reading the parameter location at location; provide each where the Release deploys, and fill the pointers the Release leaves for them
warn: notes-api sets the variable EVENTHUB_NAME in the environment of the instance notes-api, and the draft delivers an instance's environment from its connections alone, so the variable is not carried: the instance's Release entry names it, for the author to set where the instance is configured
mapped ehmodule (Microsoft.EventHub/namespaces) to core/messaging/azure-event-hubs as a reference, HIGH at 0.8656
mapped notes-site (Microsoft.Web/staticSites) to imported/compute/microsoft-web-staticsites as a draft, NONE at 0.05
made no choice for vnet-notes (Microsoft.Network/virtualNetworks)
mapped notes-api (Microsoft.Web/sites) to core/compute/server as a reference, HIGH at 0.9
made no choice for resourceId('Microsoft.Network/virtualNetworks/subnets', 'vnet-notes', 'snet-app') ()
[… omitted: what the pull could not render yet, a stop of the App Service Recipe's assertion that the Release names the subnet, which the sections below explain]
external inputs: dependency pins were written and are complete; 0 external input(s) pinned, and any this Release also needs are still unpinned
external inputs: a build of this Release halts naming the unpinned URL; fixing what stopped the render and resolving again pins it
Pull complete: <workspace>/release.lock (entities=8, source_artifacts=0, external_inputs=0)
External inputs were not fully discovered: dependency pins are complete, external-input pins may not be (see the diagnostics above)
  • info पंक्तियाँ बताती हैं कि इम्पोर्टर ने बिना किसी प्रश्न के क्या तय किया। पहली कहती है कि ड्राफ़्ट arm के लिए हैं। दूसरी मॉड्यूल को पहचानती है: रिसोर्स ehmodule Event Hubs नेमस्पेस का Azure Verified Modules मॉड्यूल है, और टेम्पलेट उसके लिए जो पैरामीटर सेट करता है वे मॉड्यूल के अपने पैरामीटर की तरह पढ़े जाते हैं, इसलिए ड्राफ़्ट उसे एक नेमस्पेस मानता है, न कि पढ़ने के लिए एक नेस्टेड टेम्पलेट। तीसरी कहती है कि स्टैटिक वेब ऐप टेम्पलेट से ड्राफ़्ट किया जाता है।
  • warn पंक्तियाँ बताती हैं कि ड्राफ़्ट क्या नहीं रखता। पहली वह वेरिएबल है जिसे साइट मॉड्यूल के name आउटपुट से पढ़ती है: ड्राफ़्ट कनेक्शन केवल उसी के लिए जोड़ता है जिसे कोई Component प्रकाशित करता है, और नेमस्पेस अपने नाम के लिए कोई कुंजी प्रकाशित नहीं करता, इसलिए कनेक्शन केवल निर्भरता के लिए मौजूद है। दूसरी उस वर्चुअल नेटवर्क का नाम देती है जिसे टेम्पलेट बनाता है और जिसे ड्राफ़्ट आपके लिए छोड़ता है, जैसा ड्राफ़्ट आपके लिए क्या छोड़ता है समझाता है। तीसरी उस वेरिएबल का नाम देती है जिसे साइट सेट करती है और जिसे ड्राफ़्ट का कोई कनेक्शन नहीं पहुँचाता।
  • mapped पंक्तियाँ बताती हैं कि हर रिसोर्स क्या बना। ehmodule स्टैंडर्ड लाइब्रेरी के core/messaging/azure-event-hubs का एक इंस्टेंस है, और notes-api जेनेरिक सर्वर, core/compute/server, का एक इंस्टेंस, दोनों उच्च स्तर में मैच किए गए और रेफ़र किए गए। notes-site किसी Component से मैच नहीं करता, इसलिए वह बिना मैच के एक ड्राफ़्ट है। made no choice पंक्तियाँ बताती हैं कि ड्राफ़्ट किसके लिए कुछ तय नहीं करता: वर्चुअल नेटवर्क, और सबनेट पॉइंटर जिसे Release खाली छोड़ता है।
  • pull इम्पोर्ट द्वारा वह सब लाना है जिस पर ड्राफ़्ट किया गया Release निर्भर है, जैसा aggrega pull करता है, release.lock में। Manifest नेमस्पेस और साइट के लिए जिन Recipes के नाम देता है, वे अपने रिसोर्स खुद लिखते हैं और कुछ भी सोर्स नहीं करते, इसलिए source_artifacts का मान 0 है और pull कैटलॉग से बाहर किसी चीज़ के लिए नहीं पहुँचता। फिर इम्पोर्ट Release को रेंडर करके वे इनपुट खोजने की कोशिश करता है जिन्हें बिल्ड लाएगा, और App Service Recipe उसे रोक देता है: ड्राफ़्ट अभी कोई सबनेट नहीं बताता। इम्पोर्ट फिर भी समाप्त होता है, लॉकफ़ाइल लिखी जा चुकी होती है, और कहता है कि बाहरी इनपुट पूरी तरह नहीं खोजे गए; यह वही रुकावट है जिसे वैलिडेशन आगे रिपोर्ट करता है।

यह क्या लिखता है

Aggregate, Release और Manifest का नाम imported/notes है, उस फ़ोल्डर के नाम पर जिसे इम्पोर्ट ने पढ़ा — फ़ाइल के रूप में इम्पोर्ट किए गए टेम्पलेट का नाम फ़ाइल के नाम पर होता है, main — उस नेमस्पेस के अंतर्गत जो इम्पोर्टर की target_namespace सेटिंग तय करती है, imported जब तक आप कोई और न रखें (सेटिंग)।

aggregate.yaml — हर रिसोर्स के लिए एक प्रविष्टि, और वह कनेक्शन जो साइट बनाती है:

# Sources read: main.json, main.parameters.json.
# Substrate the source creates, left to the operator: vnet-notes (Microsoft.Network/virtualNetworks).
apiVersion: aggrega.ai/v1beta1
kind: Aggregate
metadata:
name: imported/notes
version: 0.1.0
description: Draft Aggregate imported from a source in the arm format.
spec:
components:
ehmodule:
type: core/messaging/azure-event-hubs
notes-site:
type: imported/compute/microsoft-web-staticsites
values:
name: "notes-site"
notes-api:
type: core/compute/server
uses:
# Not wired: notes-api sets the variable EVENTHUB_NAMESPACE at properties.siteConfig.appSettings.0.value from ehmodule's outputs.name.value; ehmodule publishes no provides key for it.
ehmodule:
ehmodule:
target: ehmodule

स्टैटिक वेब ऐप उस टाइप का एक घटक है जिसे इम्पोर्ट ने ड्राफ़्ट किया, imported/compute/microsoft-web-staticsites। नेमस्पेस से साइट के कनेक्शन में कोई inject ब्लॉक नहीं है, क्योंकि ड्राफ़्ट किसी कनेक्शन से वेरिएबल तभी पहुँचाता है जब Component मान प्रकाशित करता है, और उसके ऊपर की टिप्पणी बताती है कि वह किस वेरिएबल को नहीं जोड़ता और क्यों।

release.yaml — एनवायरनमेंट, हर रिसोर्स की सेटिंग:

apiVersion: aggrega.ai/v1beta1
kind: Release
metadata:
name: imported/notes
# environment is a drafted default, since no source names the environment this Release deploys to; change it to name the one it deploys to.
environment: development
version: 0.1.0
description: Draft Release imported from a source in the arm format.
spec:
aggregate: imported/notes
manifest: imported/notes
components:
# Module parameters the source sets and the draft does not translate: location, name, publicNetworkAccess, skuCapacity, skuName.
ehmodule: {}
notes-site:
infra:
# From the template parameter location, the value the parameters file supplies.
location: "northeurope"
overrides:
appLocation: "/"
outputLocation: "dist"
name: "Free"
tier: "Free"
# Properties the source writes and the draft does not place: kind, properties.siteConfig.linuxFxVersion.
# Environment variables the source sets and no connection delivers: EVENTHUB_NAME = notes.
notes-api:
infra:
overrides:
service_plan_id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/notes-platform/providers/Microsoft.Web/serverfarms/plan-notes"
# From the template parameter location, the value the parameters file supplies.
location: "northeurope"
# Left for the Release, since the source cannot supply it: infra.overrides.virtual_network_subnet_id, the pointer to the resource "resourceId('Microsoft.Network/virtualNetworks/subnets', 'vnet-notes', 'snet-app')", which the draft leaves to the operator and the source names as "[resourceId('Microsoft.Network/virtualNetworks/subnets', 'vnet-notes', 'snet-app')]"; the catalog Recipe takes the resource's literal identifier: write it
virtual_network_subnet_id: ""

एनवायरनमेंट, development, एक डिफ़ॉल्ट है जिसे इम्पोर्ट इसलिए लिखता है क्योंकि कोई टेम्पलेट कोई नाम नहीं देता। टेम्पलेट का location पैरामीटर स्टैटिक वेब ऐप और साइट की प्रविष्टियों तक उस मान के रूप में पहुँचता है जो पैरामीटर फ़ाइल देती है, northeurope। साइट का service_plan_id शाब्दिक आइडेंटिफ़ायर के रूप में ले जाया गया है जिसे टेम्पलेट लिखता है। नेमस्पेस की प्रविष्टि खाली है, और उसके ऊपर की टिप्पणी उन मॉड्यूल पैरामीटर को सूचीबद्ध करती है जिन्हें ड्राफ़्ट अनुवादित नहीं करता।

एक कुंजी खाली है, और उसकी टिप्पणी कारण बताती है: virtual_network_subnet_id किसी रिसोर्स का पॉइंटर है, जिसे Azure Resource Manager के लिए स्टैंडर्ड लाइब्रेरी के Recipes रिसोर्स के शाब्दिक /subscriptions/… आइडेंटिफ़ायर के रूप में लेते हैं। टेम्पलेट साइट का सबनेट resourceId एक्सप्रेशन के रूप में लिखता है जो टेम्पलेट के ही किसी रिसोर्स का नाम लेता है, और एक्सप्रेशन ऐसा आइडेंटिफ़ायर नहीं है जिसे Recipe ले सके, इसलिए ड्राफ़्ट कुंजी को खाली छोड़ता है और एक्सप्रेशन का नाम टिप्पणी में देता है। इसके विपरीत, ड्राफ़्ट किया गया रिसोर्स टेम्पलेट के हर एक्सप्रेशन को पूरा रखता है।

कंटेनर इमेज प्रविष्टि में नहीं है। टेम्पलेट उसे linuxFxVersion के भीतर लिखता है, जो ऐसी प्रॉपर्टी है जिसे ड्राफ़्ट कहीं नहीं रखता, और प्रविष्टि के ऊपर की टिप्पणी kind और linuxFxVersion को उन प्रॉपर्टी में गिनाती है जिन्हें वह नहीं रखता।

manifest.yaml — वह Recipe जिससे हर घटक arm पर साकार होता है:

apiVersion: aggrega.ai/v1beta1
kind: Manifest
metadata:
name: imported/notes
version: 0.1.0
spec:
mappings:
components:
type: {}
name:
ehmodule: arm/azure-event-hubs
notes-site: arm/microsoft-web-staticsites
notes-api: arm/server-app-service

स्टैटिक वेब ऐप के लिए स्टैंडर्ड लाइब्रेरी में कोई Component नहीं है, इसलिए इम्पोर्ट वर्कस्पेस के catalog फ़ोल्डर के नीचे एक Recipe के साथ एक ड्राफ़्ट करता है: Component imported/compute/microsoft-web-staticsites वह name घोषित करता है जो टेम्पलेट साइट को देता है, एक location, और टेम्पलेट जो हर प्रॉपर्टी लिखता है उसके लिए वेंडर के अपने नामों में एक overrides ऑब्जेक्ट, और Recipe microsoft-web-staticsites उस टाइप और API संस्करण का एक Microsoft.Web/staticSites रिसोर्स लिखता है। ड्राफ़्ट सादी फ़ाइलें हैं जिन्हें आप पढ़ और संपादित कर सकते हैं:

apiVersion: aggrega.ai/v1beta1
kind: Component
metadata:
name: imported/compute/microsoft-web-staticsites
version: 0.1.0
description: "Draft Component of the resource type Microsoft.Web/staticSites@2023-01-01, imported from a source in the arm format."
labels:
component.aggrega.ai/type: resource
component.aggrega.ai/category: compute
component.aggrega.ai/hosting: managed
spec:
schema:
values:
type: object
properties:
# identity: the resource's own name or identifier
# The source writing the resource gives no description of name.
name:
type: string
required: true
additionalProperties: false
infra:
type: object
properties:
# placement: where the resource is deployed
# The source writing the resource gives no description of location.
location:
type: string
required: true
# override: every writable property no other rule places, each under the vendor's own name
overrides:
type: object
description: "Writable settings of Microsoft.Web/staticSites@2023-01-01, each under the vendor's own name, which the Recipe passes to the resource as written; its header lists the names it reads."
additionalProperties: true
additionalProperties: false
[… omitted: the values the Component publishes, id and name]

release.lock उन कैटलॉग एंटिटी को डाइजेस्ट के अनुसार दर्ज करती है जिन तक Release रिज़ॉल्व हुआ; .aggrega-import.json इम्पोर्ट ने जो लिखा उसका रिकॉर्ड है, जिसे बाद में aggrega import --sync पढ़ता है।

वैलिडेट करें

Terminal window
aggrega validate --release release.yaml

वैलिडेशन रुक जाता है। ड्राफ़्ट साइट के लिए कोई सबनेट नहीं बताता, और App Service Recipe किसी साइट को आपके अपने नेटवर्क के सबनेट से केवल उसके आइडेंटिफ़ायर के ज़रिए जोड़ता है:

[CATALOG_ERROR E0033]
Recipe/FeatureRecipe assertions
[… omitted: the line beginning "caused by: Recipe "server-app-service" instance "notes-api" assertion "placement_supplied"", which ends with the Recipe's message: … infra.overrides.virtual_network_subnet_id is "", and this Recipe takes the subnet the app joins by virtual network integration as the subnet's resource ID: set it to /subscriptions/<subscription>/resourceGroups/<group>/providers/Microsoft.Network/virtualNetworks/<network>/subnets/<subnet>, a subnet delegated to Microsoft.Web/serverFarms, or remove it]
release dependency validation failed: 1 diagnostic(s)

इनकार बताता है कि क्या बदलना है और कहाँ, उस दस्तावेज़ में जिसे आप बदलते हैं। यहाँ यह release.yaml की notes-api प्रविष्टि है, और सबनेट के बाद बिल्ड एक दूसरा मान बताता है: कंटेनर इमेज। टेम्पलेट उसे linuxFxVersion में लिखता है, जिसे ड्राफ़्ट नहीं रखता, और App Service के लिए जेनेरिक सर्वर के Recipe में अपनी कोई इमेज नहीं है, इसलिए बिल्ड एक संदेश के साथ रुक जाता है जो कहता है कि Release infra.image सेट नहीं करता। इमेज Release में देना आपका काम है।

नेमस्पेस की टिप्पणी skuName, skuCapacity और location को सूचीबद्ध करती है, जिन्हें मॉड्यूल टेम्पलेट से लेता है और ड्राफ़्ट भी नहीं रखता। इनके बिना Recipe के अपने डिफ़ॉल्ट लागू रहते हैं; infra.overrides.sku_name, infra.overrides.sku_capacity और infra.overrides.location टेम्पलेट के मान ले जाते हैं। उदाहरण के reviewed फ़ोल्डर में release.yaml है जिसमें सब लिखे हैं:

# Module parameters the source sets and the draft does not translate: location, name, publicNetworkAccess, skuCapacity, skuName.
ehmodule:
infra:
overrides:
# Where the template sets skuName and skuCapacity, which the draft places nowhere: the namespace's tier and its throughput units.
sku_name: "Standard"
sku_capacity: 2
# Where the template sets location, which the draft places nowhere on a module: the namespace's region.
location: "northeurope"

और साइट की प्रविष्टि, इमेज और सबनेट के साथ:

# Properties the source writes and the draft does not place: kind, properties.siteConfig.linuxFxVersion.
# Environment variables the source sets and no connection delivers: EVENTHUB_NAME = notes.
notes-api:
infra:
# The template writes the container image in properties.siteConfig.linuxFxVersion, which the draft places nowhere: the image the site runs.
image: "ghcr.io/example/notes-api:2.3.0"
overrides:
service_plan_id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/notes-platform/providers/Microsoft.Web/serverfarms/plan-notes"
# From the template parameter location, the value the parameters file supplies.
location: "northeurope"
# The subnet the template's virtual network holds, as the literal ID the Recipe takes, in the resource group the network is deployed to.
virtual_network_subnet_id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/notes-network/providers/Microsoft.Network/virtualNetworks/vnet-notes/subnets/snet-app"

उदाहरण की चेक स्क्रिप्ट इस Release को बिल्ड करती है, और पुष्टि करती है कि ड्राफ़्ट ऊपर के संदेश के साथ रुकता है।

बिल्ड करें

समीक्षा किए गए Release वाले फ़ोल्डर में जाएँ, या source में release.yaml को उसी तरह संपादित करें, और बिल्ड करें:

Terminal window
aggrega validate --release release.yaml
aggrega build --release release.yaml --auto-pull

Release अब उस release.lock से मेल नहीं खाता जो इम्पोर्ट ने लिखी थी, इसलिए बिल्ड को --auto-pull चाहिए, जो उसे दोबारा रिज़ॉल्व करता है; उसके बिना बिल्ड रुक जाता है और aggrega pull का नाम देता है। वैलिडेशन प्रिंट करता है:

release dependency validation passed: release.yaml (schema-pillar + dependency pillars)

और बिल्ड, जहाँ <workspace> उस फ़ोल्डर के स्थान पर है जिसमें आपने इसे चलाया:

[… omitted: the pull's line reporting the lockfile it wrote]
[… omitted: a total build time, which differs per run]
Build completed: 1 file written to <workspace>/dist

arm-template.json पढ़ें

बिल्ड एक फ़ाइल लिखता है, dist/arm/arm-template.json: असेंबल किया गया टेम्पलेट, भाषा संस्करण 2.0 में, जिसमें हर उस रिसोर्स के लिए resources के अंतर्गत एक प्रविष्टि है जिसे कोई घटक लिखता है, जिसका नाम घटक के इंस्टेंस आईडी को शब्दों में समेटकर रखा गया है:

Ehmodule the Event Hubs namespace, in a nested template
NotesApi the App Service site
NotesApiFtpPublishing the site's FTP publishing policy, which the Recipe turns off
NotesApiScmPublishing the site's SCM publishing policy, which the Recipe turns off
NotesSite the static web app, the resource the draft Recipe writes

नेमस्पेस की प्रविष्टि में वह नेमस्पेस है जिसे Recipe लिखता है, उन सेटिंग के साथ जो Release रखता है — टियर, थ्रूपुट यूनिट और रीजन — और बाकी के लिए Recipe की अपनी:

"Ehmodule": {
"apiVersion": "2025-04-01",
"metadata": {
"aggrega.ai/provenance": {
"aggrega.ai/aggregate-name": "imported/notes",
"aggrega.ai/boundary-path": "default",
[… omitted: a compiler-version entry, which moves with the build]
"aggrega.ai/component-id": "ehmodule",
"aggrega.ai/environment": "development",
"aggrega.ai/provider": "arm",
[… omitted: a provider-version entry, which moves with the build]
"aggrega.ai/recipe-uri": "azure-event-hubs:1.0.0"
}
},
"name": "[format('Ehmodule-{0}', uniqueString(deployment().name))]",
"properties": {
"expressionEvaluationOptions": {
"scope": "inner"
},
"mode": "Incremental",
"template": {
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"outputs": {
"serviceBusEndpoint": {
"type": "string",
"value": "[reference(resourceId('Microsoft.EventHub/namespaces', 'ehmodule'), '2026-01-01').serviceBusEndpoint]"
}
},
"resources": [
{
"apiVersion": "2026-01-01",
"location": "northeurope",
"name": "ehmodule",
"properties": {
"disableLocalAuth": true,
"isAutoInflateEnabled": false,
"minimumTlsVersion": "1.2",
"publicNetworkAccess": "Enabled"
},
"sku": {
"capacity": 2,
"name": "Standard",
"tier": "Standard"
},
"type": "Microsoft.EventHub/namespaces"
}
]
}
},
"type": "Microsoft.Resources/deployments"
},

साइट की प्रविष्टि में प्लान, सबनेट, इमेज उस कंटेनर के रूप में जिसे साइट चलाती है, और वह पोर्ट है जिसे जेनेरिक सर्वर घोषित करता है:

"NotesApi": {
"apiVersion": "2025-03-01",
"kind": "app,linux,container",
"location": "northeurope",
"metadata": {
"aggrega.ai/provenance": {
"aggrega.ai/aggregate-name": "imported/notes",
"aggrega.ai/boundary-path": "default",
[… omitted: a compiler-version entry, which moves with the build]
"aggrega.ai/component-id": "notes-api",
"aggrega.ai/environment": "development",
"aggrega.ai/provider": "arm",
[… omitted: a provider-version entry, which moves with the build]
"aggrega.ai/recipe-uri": "server-app-service:1.0.0"
}
},
"name": "notes-api",
"properties": {
"clientAffinityEnabled": false,
"httpsOnly": true,
"publicNetworkAccess": "Disabled",
"serverFarmId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/notes-platform/providers/Microsoft.Web/serverfarms/plan-notes",
"siteConfig": {
"alwaysOn": true,
"appSettings": [
{
"name": "WEBSITES_PORT",
"value": "8080"
}
],
"ftpsState": "Disabled",
"linuxFxVersion": "DOCKER|ghcr.io/example/notes-api:2.3.0",
"minTlsVersion": "1.2",
"vnetRouteAllEnabled": true
},
"virtualNetworkSubnetId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/notes-network/providers/Microsoft.Network/virtualNetworks/vnet-notes/subnets/snet-app"
},
"type": "Microsoft.Web/sites"
},

साइट को WEBSITES_PORT मिलता है और टेम्पलेट का सेट किया कुछ नहीं: EVENTHUB_NAMESPACE और EVENTHUB_NAME ऐसे वेरिएबल हैं जिन्हें ड्राफ़्ट ने नहीं पहुँचाया, जिनके नाम warn पंक्तियाँ और टिप्पणियाँ बताती हैं। नेमस्पेस का नाम ehmodule है, जो घटक का नाम है, जबकि टेम्पलेट ने उसे evh-notes नाम दिया था: मॉड्यूल का name तय करना Recipe का काम है, और प्रविष्टि के ऊपर की टिप्पणी उसे उन पैरामीटरों में गिनाती है जिन्हें ड्राफ़्ट अनुवादित नहीं करता।

इसे डिप्लॉय करें

टेम्पलेट एक रिसोर्स-ग्रुप टेम्पलेट है। बिल्ड कोई पैरामीटर फ़ाइल नहीं लिखता और Azure के विरुद्ध कुछ नहीं चलाता: कमांड आपके हैं। पहले देखें कि टेम्पलेट क्या बदलेगा, फिर उसे डिप्लॉय करें:

Terminal window
az deployment group what-if --resource-group <group> --template-file dist/arm/arm-template.json
az deployment group create --resource-group <group> --name <name> --template-file dist/arm/arm-template.json

ARM Provider पेज ये कमांड बताता है, वह स्टैक जो अपने प्रबंधन से हटाई गई चीज़ों को कभी नहीं हटाता, और यह कि हर फ़्लैग क्या तय करता है। टेम्पलेट के डिप्लॉय होने से पहले, वे रिसोर्स मौजूद होने चाहिए जिन्हें Release नाम देता है पर टेम्पलेट डिप्लॉय नहीं करता: App Service प्लान और वह सबनेट जिससे साइट जुड़ती है, जिसे Microsoft.Web/serverFarms को डेलीगेट किया गया है।

AI असिस्टेंट के साथ

Aggrega के टूल के साथ सेट अप किया गया AI असिस्टेंट भी यही कर सकता है: यह प्रॉम्प्ट उसमें पेस्ट करें।

केवल Aggrega के टूल का उपयोग करें, और कोई फ़ोल्डर खुद न बनाएं। यदि वर्कस्पेस फ़ोल्डर में अभी `import-arm` फ़ोल्डर नहीं है, तो `draft` टूल को एक बार `example` को `import-arm` पर सेट करके और बिना `dir` के कॉल करें: वह उदाहरण को एक नए `import-arm` फ़ोल्डर में लिखता है। फिर `import` टूल को `workspace_root` को `import-arm/source` पर और `source` को `notes` पर सेट करके कॉल करें: वह अपने ड्राफ़्ट `import-arm/source` में लिखता है और उन्हें जिसकी ज़रूरत है उसे pull करता है। फिर `build` टूल को `workspace_root` को `import-arm/reviewed` पर, `release` को `release.yaml` पर, `auto_pull` को true पर और `write` को true पर सेट करके कॉल करें। मुझे बताएं कि बिल्ड ने कौन-सी फ़ाइलें लिखीं; वे `import-arm/reviewed/dist/` के अंतर्गत हैं।

reviewed फ़ोल्डर में वह ड्राफ़्ट है जिसमें मान लिखे गए हैं, जैसा वैलिडेट उन्हें सूचीबद्ध करता है; अपने ड्राफ़्ट की समीक्षा करने के लिए, असिस्टेंट से कहें कि वह पहले import-arm/source को वैलिडेट करे और बताए कि वह कहाँ रुकता है।

इसे VS Code में खोलें

Visual Studio Code के लिए Aggrega एक्सटेंशन इंस्टॉल होने पर, VS Code में फ़ोल्डर import-arm/source खोलें, जहाँ इम्पोर्ट ने अपने ड्राफ़्ट लिखे। फ़ोल्डर में एक Release है, ड्राफ़्ट किया गया release.yaml, इसलिए एडिटर उसे आपके लिए चुन लेता है, और जैसे-जैसे आप ड्राफ़्ट संपादित करते हैं वह उन्हें उसी Release के सामने जाँचता है, जो मिलता है उसे फ़ाइल में और Problems पैनल में चिह्नित करता है। Command Palette में Aggrega: Show topology graph Release के घटकों और उनके बीच के कनेक्शनों को खींचता है। Aggrega: Build, Aggrega: Preview build और Aggrega: Pull उसी Release पर काम करते हैं, और हर एक एक्टिविटी बार में Aggrega व्यू के Commands पैनल पर एक बटन भी है; Build अपनी फ़ाइलें फ़ोल्डर के dist/ में लिखता है। Visual Studio Code में Aggrega का उपयोग करें बाकी सब बताता है।

जब टेम्पलेट बदलता है

.aggrega-import.json को ड्राफ़्ट के बगल में रखें, और टेम्पलेट बदलने के बाद चलाएं:

Terminal window
aggrega import notes --sync

यह रिकॉर्ड में रखा लक्ष्य, arm, पढ़ता है, और केवल वही बदलता है जो इम्पोर्ट ने लिखा था। जब main.json में स्टैटिक वेब ऐप का outputLocation dist से build में बदलता है, तो इम्पोर्ट कहता है:

changed spec.components.notes-site.infra.overrides.outputLocation in release.yaml

और release.yaml को उस एक बदली हुई पंक्ति के साथ लिखता है; आपके लिखे मान उसके बगल में वैसे ही रहते हैं। स्रोत ने जिस हिस्से को छुआ नहीं, वह डिस्क पर जैसा है वैसा ही रहता है, संपादित हो या नहीं; जहाँ स्रोत ने आपके संपादित किए हिस्से को बदला, वहाँ वह रुक जाता है, उस हिस्से का नाम बताता है और कुछ नहीं लिखता, ताकि आप हाथ से उसका मेल बैठा सकें। aggrega import नियम और हर फ़्लैग पूरी तरह बताता है।

एक टेम्पलेट Microsoft.Resources/deployments रिसोर्स के ज़रिए दूसरे को डिप्लॉय कर सकता है, जिसका templateLink.relativePath उसके बगल की एक फ़ाइल का नाम देता है। इम्पोर्ट इम्पोर्ट की गई डायरेक्टरी के भीतर लिंक किए गए टेम्पलेट पढ़ता है: वह एक टेम्पलेट से शुरू करता है, यानी रूट, रूट जिस हर टेम्पलेट को लिंक करता है उसे पढ़ता है, और उन सबके रिसोर्स को एक Aggregate के रूप में ड्राफ़्ट करता है।

कई टेम्पलेट वाली डायरेक्टरी अपना रूट इससे तय करती है कि कौन किसे लिंक करता है: रूट वह एकमात्र टेम्पलेट है जिसे कोई दूसरा लिंक नहीं करता। जिस डायरेक्टरी में दो ऐसे टेम्पलेट हैं जिनके बीच कोई लिंक नहीं, उसका कोई एक रूट नहीं होता, और इम्पोर्ट रुक जाता है तथा दोनों के नाम बताता है:

halt: the sources network.json, site.json are each linked by no other source, and the root setting names none of them: set root to the path of the one to start from

root सेटिंग वह टेम्पलेट बताती है जहाँ से शुरू करना है, वर्कस्पेस कॉन्फ़िगरेशन में इम्पोर्टर की प्रविष्टि में। uri इम्पोर्टर को उसकी पहचान और आपके चलाए कंपाइलर के संस्करण से नाम देता है, जैसा aggrega plugin add importer उसे लिखता है (कौन-सा इम्पोर्टर किसी स्रोत को ड्राफ़्ट में बदलता है):

plugins:
importer:
- uri: importer/arm:<version>
with:
settings:
root: site.json

root सेट होने पर, इम्पोर्ट site.json और उसके लिंक किए टेम्पलेट पढ़ता है, और network.json को छोड़ देता है।

इम्पोर्ट की गई डायरेक्टरी से बाहर जाने वाला लिंक — ../shared/dns.json — नहीं पढ़ा जाता: इम्पोर्ट कभी भी दी गई डायरेक्टरी से बाहर की फ़ाइल नहीं खोलता। वह चेतावनी देता है, रिसोर्स और पाथ का नाम बताते हुए, और उस रिसोर्स को अपने ही एक रिसोर्स के रूप में ड्राफ़्ट करता है, उस टेम्पलेट के हर आउटपुट को, जिसे टेम्पलेट पढ़ता है, उस एक्सप्रेशन के रूप में रखते हुए जो टेम्पलेट के डिप्लॉय होने पर उसका मूल्यांकन करता है:

warn: dns is a Microsoft.Resources/deployments resource of main.json whose template is linked by a relative path leaving the imported directory, which the import does not read: no resource of that template is drafted, and each of its outputs the template reads is carried as text evaluated when the template deploys; to draft its resources, place the linked template inside the imported directory and link it by templateLink.relativePath

लिंक किए गए टेम्पलेट को इम्पोर्ट की गई डायरेक्टरी के भीतर रखें और अगला इम्पोर्ट उसे पढ़ लेगा।

जब कोई नाम पहले से लिया हुआ हो

जिस रिसोर्स का ड्राफ़्ट Component बनाता है, उसे वह नाम मिलता है जो इम्पोर्ट उसके टाइप से चुनता है: स्टैटिक वेब ऐप के लिए imported/compute/microsoft-web-staticsites। जहाँ उस नाम का Component वर्कस्पेस के किसी कैटलॉग फ़ोल्डर में या hub में पहले से मौजूद हो, और इस इम्पोर्ट ने उसे ड्राफ़्ट न किया हो, वहाँ इम्पोर्ट उसके ऊपर नहीं लिखता और अनुमान नहीं लगाता। वह रिसोर्स को रोक लेता है, न उसे ड्राफ़्ट करता है न उसका संदर्भ देता है, और चेतावनी देता है। उदाहरण को उसी वर्कस्पेस के दूसरे फ़ोल्डर में --output-dir second के साथ दूसरी बार इम्पोर्ट करने पर, जबकि पहले इम्पोर्ट ने Component को वर्कस्पेस के catalog फ़ोल्डर में लिखा था, यह कहता है:

warn: notes-site (Microsoft.Web/staticSites) is held back: the catalog holds the Component imported/compute/microsoft-web-staticsites a draft of it takes, which this import did not draft, so the resource is neither drafted nor referenced; to reference it, write in the importer's settings the entry {"mapping_overrides":{"arm":{"Microsoft.Web/staticSites":{"component":"imported/compute/microsoft-web-staticsites","category":"compute","traits":{"component.aggrega.ai/hosting":"managed","component.aggrega.ai/type":"resource"},"vendor":"staticsites"}}}}, then fill the instance's infra in the Release

इम्पोर्टर की प्रविष्टि की mapping_overrides सेटिंग, जो फ़ॉर्मेट arm और फिर रिसोर्स टाइप से कुंजीबद्ध है, टाइप को उस Component से मैप करती है जो मौजूद है, और चेतावनी जो प्रविष्टि छापती है वही लिखनी है (सेटिंग)। इसके साथ, अगला इम्पोर्ट Component को रेफ़रेंस करता है: notes-site एक रेफ़रेंस के रूप में मैप होता है, और Release में उसकी प्रविष्टि में कोई कुंजी नहीं है, केवल एक टिप्पणी है जो टेम्पलेट द्वारा लिखी गई प्रॉपर्टी का नाम बताती है:

notes-site: {}

Component एक आवश्यक name और location घोषित करता है और ड्राफ़्ट इनमें से कोई नहीं लिखता, इसलिए इम्पोर्ट हर एक को अनुपस्थित बताते हुए समाप्त होता है, ड्राफ़्ट लिखे जाने के साथ। इन्हें, और टिप्पणी में सूचीबद्ध प्रॉपर्टी को, Release में लिखें, जैसे Component उन्हें घोषित करता है।

ड्राफ़्ट आपके लिए क्या छोड़ता है

इम्पोर्ट वह ड्राफ़्ट करता है जो टेम्पलेट बताता है और जो आपका कैटलॉग तय करता है, और बताता है कि वह कहाँ रुका। किसी टेम्पलेट के लिए वह ये छोड़ देता है:

  • वह आधार-परत जिसे टेम्पलेट दूसरों की सेवा के लिए बनाता है। वर्चुअल नेटवर्क vnet-notes और उसका सबनेट साइट के लिए टेम्पलेट में मौजूद हैं। ड्राफ़्ट कोई नेटवर्क नहीं बनाता: कैटलॉग का कोई Component जिस नेटवर्क में चलता है उसे अपनी रिसोर्स ID से लेता है, infra.overrides के अंतर्गत, और वह नेटवर्क आपका है। warn पंक्ति ऐसे हर रिसोर्स का नाम बताती है, और जो पॉइंटर उसकी ओर इशारा करते थे वे Release की खाली कुंजियाँ हैं। जहाँ Release डिप्लॉय होता है, वहाँ नेटवर्क और सबनेट पहले से मौजूद हैं, या आप उन्हें उस टेम्पलेट के साथ डिप्लॉय करते हैं जो आपने इम्पोर्ट किया।
  • वे मान जिन्हें ड्राफ़्ट नहीं रखता। हर Release प्रविष्टि की टिप्पणी उन मॉड्यूल पैरामीटर और रिसोर्स प्रॉपर्टी को सूचीबद्ध करती है जिन्हें ड्राफ़्ट नहीं रखता, जिनमें यहाँ नेमस्पेस का टियर, थ्रूपुट यूनिट, रीजन और नाम, और साइट के kind और linuxFxVersion शामिल हैं, ताकि टेम्पलेट की सेटिंग बताई जाए, चुपचाप छोड़ी न जाए। जहाँ किसी Component में उनमें से किसी के लिए जगह है, वहाँ आप उसे लिखते हैं, जैसा वैलिडेट अनुभाग करता है।
  • एनवायरनमेंट वेरिएबल जिन्हें कोई कनेक्शन नहीं पहुँचाता। साइट के EVENTHUB_NAMESPACE और EVENTHUB_NAME के नाम Aggregate और Release की टिप्पणियों में और हर एक के लिए एक warn पंक्ति में दिए गए हैं। जहाँ साइट Release में कॉन्फ़िगर की गई है, वहाँ आप उन्हें सेट करते हैं।
  • कंटेनर इमेज। ड्राफ़्ट इमेज तभी रखता है जब टेम्पलेट उसे किसी ऐसी प्रॉपर्टी में बताता है जिसे ड्राफ़्ट रखता है। यह टेम्पलेट उसे linuxFxVersion में लिखता है, इसलिए ड्राफ़्ट कोई इमेज नहीं रखता, और बिल्ड infra.image का नाम बताकर रुक जाता है: इमेज Release में देना आपका काम है।

जिस मॉड्यूल के लिए स्टैंडर्ड लाइब्रेरी कुछ मैप नहीं करती, वह पूरा रखा जाता है। जहाँ कोई टेम्पलेट ऐसे रिसोर्स टाइप का Azure Verified Modules मॉड्यूल डिप्लॉय करता है जिसे इम्पोर्टर की कोई पंक्ति मैप नहीं करती, वहाँ इम्पोर्ट एक Component और एक Recipe ड्राफ़्ट करता है जो मॉड्यूल को oci://mcr.microsoft.com/bicep/<path> से स्रोत के रूप में लेते हैं, टेलीमेट्री बंद के साथ, और जो मॉड्यूल पैरामीटर किसी सीक्रेट से भरा जाता है उसे छोड़ दिया जाता है और उस पर चेतावनी दी जाती है। जिस टाइप को कोई पंक्ति मैप नहीं करती उसका रिसोर्स टेम्पलेट से वैसे ही ड्राफ़्ट होता है जैसे स्टैटिक वेब ऐप; ड्राफ़्ट का स्वैप संकेत aggrega import --format arm-schema का नाम देता है, जो वही Component विक्रेता के स्कीमा से ड्राफ़्ट करता है, जैसा ऐसी सेवा डिप्लॉय करें जो कैटलॉग में नहीं है बताता है।

कई पंक्तियों में लिखी गई स्ट्रिंग

JSON किसी स्ट्रिंग के भीतर कच्चा लाइन ब्रेक स्वीकार नहीं करता, और इम्पोर्टर टेम्पलेट को JSON के रूप में पढ़ता है। जिस टेम्पलेट में ऐसा कोई हो — scriptContent मान में कई पंक्तियों में लिखा गया स्क्रिप्ट — वह पहचाना नहीं जाता, क्योंकि उसे पढ़ना विफल हो जाता है:

[E0350]
no importer recognises the source (source "main.json"). Pass --format to name it explicitly (for example --format agent-framework, --format arm-schema, --format arm, --format cloudformation-schema, --format compose, --format crewai, --format dify, --format flowise, --format google-adk, --format langflow, --format langgraph, --format mcp, --format n8n or --format terraform-schema)

और --format arm के साथ, इम्पोर्ट उस जगह का नाम बताकर रुक जाता है:

halt: could not parse source "main.json" as arm: json parse: invalid character '\n' in string literal at line 14, column 35

हर स्ट्रिंग को एक पंक्ति में लिखें, जहाँ टेक्स्ट टूटता है वहाँ \n रखें, और इम्पोर्ट उसे पढ़ लेगा।