exam questions

Exam AZ-400 All Questions

View all questions & answers for the AZ-400 exam

Exam AZ-400 topic 8 question 37 discussion

Actual exam question from Microsoft's AZ-400
Question #: 37
Topic #: 8
[All AZ-400 Questions]

HOTSPOT -
You have a project in Azure DevOps.
You plan to create a build pipeline that will deploy resources by using Azure Resource Manager templates. The templates will reference secrets stored in Azure
Key Vault.
You need to ensure that you can dynamically generate the resource ID of the key vault during template deployment.
What should you include in the template? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.
Hot Area:

Show Suggested Answer Hide Answer
Suggested Answer:
Box 1: "Microsoft.Resources/deployments"
Reference a secret with dynamic ID. You need to reference a key vault secret that varies based on the current deployment.
Example:
"resources": [
{
"apiVersion": "2018-05-01",
"name": "dynamicSecret",
"type": "Microsoft.Resources/deployments",
"properties": {
"mode": "Incremental",
"templateLink": {
Box 2: "templateLink"
In your parent template, you add the linked template and pass in a parameter that contains the dynamically generated resource ID.
Reference:
https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-manager-keyvault-parameter

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
AS007
Highly Voted 4 years, 8 months ago
Correct Answer
upvoted 29 times
...
ttm_19
Highly Voted 4 years, 7 months ago
TemplateLink is the correct answer. It uses uri (no such in nested templates schema) to reference the linked template and parameters to provide keyvault secret.
upvoted 19 times
BalderkVeit
3 years, 9 months ago
agree: https://docs.microsoft.com/en-us/azure/azure-resource-manager/templates/linked-templates?tabs=azure-powershell#linked-template
upvoted 2 times
...
...
vsvaid
Most Recent 1 year, 1 month ago
Correct answer
upvoted 1 times
...
gabo
1 year, 4 months ago
In summary, if you see an URI property it's a Linked Template (templatelink) and if you don't see a URI property it's a Nested template (template)
upvoted 5 times
...
syu31svc
2 years, 5 months ago
https://docs.microsoft.com/en-us/azure/azure-resource-manager/templates/key-vault-parameter?tabs=azure-cli https://docs.microsoft.com/en-us/azure/azure-resource-manager/templates/linked-templates?tabs=azure-powershell#linked-template Answer is correct
upvoted 2 times
...
Eltooth
2 years, 8 months ago
deployments templatelink
upvoted 1 times
...
rdemontis
2 years, 10 months ago
given answer is correct
upvoted 1 times
...
Optimist_Indian
2 years, 11 months ago
Got this question in Feb-2022 exam (scored 910+). Given answer is correct.
upvoted 4 times
...
totalz
3 years, 2 months ago
To me, it's more like dynamically retrieve/reference resource id by resource name. Not generate!
upvoted 1 times
...
Sant25
3 years, 4 months ago
GIVEN ANS CORRECT { "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", "contentVersion": "1.0.0.0", "parameters": {}, "variables": {}, "resources": [ { "type": "Microsoft.Resources/deployments", "apiVersion": "2021-04-01", "name": "linkedTemplate", "properties": { "mode": "Incremental", "templateLink": { "uri":"https://mystorageaccount.blob.core.windows.net/AzureTemplates/newStorageAccount.json", "contentVersion":"1.0.0.0" } } } ], "outputs": { } } https://docs.microsoft.com/en-us/azure/azure-resource-manager/templates/linked-templates?tabs=azure-powershell
upvoted 1 times
...
Azurite
3 years, 6 months ago
The answer is correct. Here the Azure Resource Manager template (ARM template) is split into many related templates. So the correct answer is to refer resource Manager template with the linked template.
upvoted 1 times
...
Dalias
3 years, 7 months ago
got this in 30 Jun 2021 exams. scored 800+ marks. verified this is correct
upvoted 5 times
dirgiklis
3 years, 6 months ago
This is a bs statement!
upvoted 4 times
...
...
jojom19980
3 years, 7 months ago
correct 100%
upvoted 1 times
...
arun06530
3 years, 10 months ago
First option is correct, for second it should be template. Verified in Udemy tutorials too.
upvoted 1 times
ScreamingHand
3 years, 6 months ago
It's template link https://docs.microsoft.com/en-us/azure/azure-resource-manager/templates/deployment-modes
upvoted 1 times
...
...
swati17
4 years, 3 months ago
template link is correct since dynamically generate the resource id
upvoted 5 times
...
zalyoung
4 years, 7 months ago
Should use TemplateLink because "To link a template, add a deployments resource to your main template. In the templateLink property, specify the URI of the template to include. " There is an uri: setting in this template https://docs.microsoft.com/en-us/azure/azure-resource-manager/templates/linked-templates
upvoted 5 times
...
pepepecas
4 years, 7 months ago
Second answer should be: TemplateLink https://jan-v.nl/post/using-dynamically-linked-azure-key-vault-secrets-in-your-arm-template/
upvoted 5 times
junkz
4 years, 7 months ago
not realy, the code in question does not reference the required json for this, it simply has its content directly present. so "template" would be my second answer
upvoted 2 times
junkz
4 years, 7 months ago
i was wrong, did not see the second line of concatenation in the sample picture. templatelink is the right answer afterall
upvoted 3 times
...
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...