Closed kkazala closed 3 years ago
I think you need blueprintMyString
to also be declared in the template inside of the artifact:
{
"kind": "template",
"properties": {
"dependsOn": ["templateA"],
"template": {
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"blueprintMyString": {
"type": "string"
}
},
"variables": {},
"resources": []
},
"resourceGroup": "SingleRG",
"displayName": "My ARM TemplateB",
"parameters": {
"blueprintMyString": {
"value": "[artifacts('templateA').outputs.myString]"
}
}
},
"type": "Microsoft.Blueprint/blueprints/artifacts",
"name": "templateB"
}
Basically the artifact parameter needs to be consumed by the template somehow.
@alex-frankel Oh, I haven't noticed it. You are absolutely, right, that was the reason! Thank you VERY much! :)
I want to pass values between artifacts. Following the https://github.com/Azure/azure-blueprints/blob/master/README.md#passing-values-between-artifacts and https://docs.microsoft.com/en-us/azure/governance/blueprints/reference/blueprint-functions#artifacts documentation I built a sample Blueprint, where the contents of artifacts are as follows: templateA.json
template B.json
Unfortunatelly,
Import-AzBlueprintWithArtifact
returnsImport-AzBlueprintWithArtifact : This artifact is invalid. Error: 'Parameter 'blueprintMyString' does not exist in the template specified by the blueprint artifact 'templateB'.'
Any idea on what the problem might be? Did I misunderstood the documentation?