exam questions

Exam AZ-204 All Questions

View all questions & answers for the AZ-204 exam

Exam AZ-204 topic 2 question 23 discussion

Actual exam question from Microsoft's AZ-204
Question #: 23
Topic #: 2
[All AZ-204 Questions]

HOTSPOT -
You are configuring a new development environment for a Java application.
The environment requires a Virtual Machine Scale Set (VMSS), several storage accounts, and networking components.
The VMSS must not be created until the storage accounts have been successfully created and an associated load balancer and virtual network is configured.
How should you complete the Azure Resource Manager 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: copyIndex -
Notice that the name of each resource includes the copyIndex() function, which returns the current iteration in the loop. copyIndex() is zero-based.

Box 2: copy -
By adding the copy element to the resources section of your template, you can dynamically set the number of resources to deploy.

Box 3: dependsOn -
Example:
"type": "Microsoft.Compute/virtualMachineScaleSets",
"apiVersion": "2020-06-01",
"name": "[variables('namingInfix')]",
"location": "[parameters('location')]",
"sku": {
"name": "[parameters('vmSku')]",
"tier": "Standard",
"capacity": "[parameters('instanceCount')]"
},
"dependsOn": [
"[resourceId('Microsoft.Network/loadBalancers', variables('loadBalancerName'))]",
"[resourceId('Microsoft.Network/virtualNetworks', variables('virtualNetworkName'))]"
],
Reference:
https://docs.microsoft.com/en-us/azure/azure-resource-manager/templates/copy-resources https://docs.microsoft.com/en-us/azure/virtual-machine-scale-sets/quick-create-template-windows

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
cloudlabadm
Highly Voted 4 years, 1 month ago
Answer: copyIndex, copy, Dependson. Check this link https://docs.microsoft.com/en-us/azure/azure-resource-manager/templates/define-resource-dependency.
upvoted 80 times
Esward
2 years, 3 months ago
Agreed
upvoted 3 times
...
130nk3r5
1 year, 4 months ago
Got this today. Went with answer here. Score 927
upvoted 5 times
...
...
mlantonis
Highly Voted 3 years, 11 months ago
Box 1: copyIndex Notice that the name of each resource includes the copyIndex() function, which returns the current iteration in the loop. copyIndex() is zero-based. Box 2: copy By adding copy loop to the resources section of your template, you can dynamically set the number of resources to deploy. You also avoid having to repeat template syntax. Box 3: dependsOn Within your Azure Resource Manager template (ARM template), the dependsOn element enables you to define one resource as a dependent on one or more resources. Reference: https://docs.microsoft.com/en-us/azure/azure-resource-manager/templates/copy-resources https://docs.microsoft.com/en-us/azure/virtual-machine-scale-sets/quick-create-template-windows https://docs.microsoft.com/en-us/azure/azure-resource-manager/templates/define-resource-dependency
upvoted 57 times
...
ben_thedevguy
Most Recent 8 months ago
Arm template is no longer in the AZ-204 exam according to this answer: https://trainingsupport.microsoft.com/en-us/mcp/forum/all/is-azure-resource-manager-arm-in-the-az-204-exam/bcdfdec6-2d40-470a-ba24-e3e6de9fdfaa Although I have not yet taken the exam since the answer is from a Microsoft Moderator which I think is reliable.
upvoted 1 times
...
bgbgvfvf
1 year, 4 months ago
I think answer is Correct!
upvoted 1 times
...
MrAzz
1 year, 6 months ago
For the second part: "Copy" What is the point of adding the same property with the same name 3 times?
upvoted 1 times
...
deathRac3
1 year, 11 months ago
Question was there for me on 29th May 2023
upvoted 3 times
...
CODE_STS
2 years, 2 months ago
Got this in the exam today! Feb 28, 2023
upvoted 3 times
...
uffuchsi
2 years, 2 months ago
Received this in my exam today (22/02/2023). Selected copyIndex, copy, and dependsOn. Score 927.
upvoted 10 times
...
saravanasanthosh
2 years, 4 months ago
Got this on exam 12/30/2022
upvoted 2 times
...
OPT_001122
2 years, 4 months ago
Thanks to all who have mentioned the exam date
upvoted 2 times
...
[Removed]
2 years, 7 months ago
Do I need to remember these functions? The options are made in a way to confuse you and make a mistake. These are things developers just lookup in documentation. Not writing an ARM template every day
upvoted 8 times
...
Rini100
3 years ago
Got this on 20 Apr 2022.. (copyIndex, copy, dependsOn)
upvoted 5 times
...
AZ204Cert
3 years ago
Got this on 04/05/22 (selected copyIndex, copy, dependsOn)
upvoted 4 times
...
petitbilly
3 years, 1 month ago
Got it in exam 03/22
upvoted 3 times
...
AidenYoukhana
3 years, 4 months ago
CORRECT ANSWER.
upvoted 2 times
...
Rev1201
3 years, 8 months ago
Answer is Correct!
upvoted 3 times
...
glam
3 years, 11 months ago
Answer: copyIndex, copy, Dependson
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 ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago