exam questions

Exam AZ-104 All Questions

View all questions & answers for the AZ-104 exam

Exam AZ-104 topic 4 question 12 discussion

Actual exam question from Microsoft's AZ-104
Question #: 12
Topic #: 4
[All AZ-104 Questions]

You have an Azure Resource Manager template named Template1 that is used to deploy an Azure virtual machine.
Template1 contains the following text:

The variables section in Template1 contains the following text:
"location": "westeurope"
The resources section in Template1 contains the following text:

You need to deploy the virtual machine to the West US location by using Template1.
What should you do?

  • A. Modify the location in the resources section to westus
  • B. Select West US during the deployment
  • C. Modify the location in the variables section to westus
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

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
mlantonis
Highly Voted 3 years, 9 months ago
Correct Answer: A You can change the location in resources. Parameters used to define the value of some variables to be able to use in different places in the template resources. Resources are used only for complicated expressions. In any case, RM will only deploy from resources. In case the value is not mentioned directly, then it will check parameters if it is specified in the resources. Based on this question, the value of location is defined directly in resources. so you change the resources location value. Use location parameter. To allow flexibility when deploying your template, use a parameter to specify the location for resources. Set the default value of the parameter to resourceGroup().location. Reference: https://docs.microsoft.com/en-us/azure/azure-resource-manager/templates/resource-location?tabs=azure-powershell https://docs.microsoft.com/en-us/azure/azure-resource-manager/templates/template-syntax#resources
upvoted 118 times
...
fedztedz
Highly Voted 4 years, 3 months ago
Correct Answer A: You can change the location in resources. Parameters used to define the value of some variables to be able to use in different places in the template resources. Resources are used only for complicated expressions. In any case, RM will only deploy from resources. In case the value is not mentioned directly, then it will check parameters if it is specified in the resources. Based on this question, the value of location is defined directly in resources. so you change the resources location value
upvoted 98 times
...
[Removed]
Most Recent 5 months, 4 weeks ago
Selected Answer: A
A is corerct
upvoted 1 times
...
Rediwed
6 months, 1 week ago
Selected Answer: A
In this case, the resource section needs to be adjusted. This is because the resource section has westeurope hardcoded, instead of referring to the variables section. If it was referring to the variables section, then value would have to be changed to west us. OR you could leave the variable value empty and change the defaultValue to west us.
upvoted 1 times
...
Amir1909
1 year ago
Correct
upvoted 1 times
...
NYTK
1 year, 7 months ago
Came in exams 21/7/2023. Selected A
upvoted 5 times
...
Juanchooo
1 year, 9 months ago
Came in my exam today 17/05/23
upvoted 6 times
...
JunetGoyal
1 year, 10 months ago
Exact same Q came in my exam on 30 April2023. I got wrong ticked C
upvoted 2 times
...
Aluksy
1 year, 11 months ago
Correct Answer A, came out in my exam today 08 April 2023.
upvoted 5 times
...
shadad
2 years ago
I took Exam of Azure- 104 at 27/2/2023 I score 920 points out of 1000 points. This was on it and my answer was: A
upvoted 3 times
...
Ashfaque_9x
2 years, 1 month ago
Selected Answer: A
Passed today on 29Jan23 with a score of 970. This question was in the exam.
upvoted 5 times
...
[Removed]
2 years, 1 month ago
on the test, I selected B it was totally wrong lmao...
upvoted 2 times
...
azaad_a
2 years, 4 months ago
Part of Exam Question
upvoted 5 times
...
NaoVaz
2 years, 5 months ago
Selected Answer: A
A) "Modify the location in the resources section to westus" The variable is not used on the shown snippet. Seeing that this is a ARM template there will be not possibility to select the region during the deployment.
upvoted 3 times
...
EmnCours
2 years, 6 months ago
Selected Answer: A
Correct Answer: A
upvoted 2 times
...
61Reasons
2 years, 6 months ago
I would have thought better to set the location variable to the desired region (and default was not mentioned).
upvoted 1 times
...
Lazylinux
2 years, 8 months ago
Selected Answer: A
A is correct..See others comments
upvoted 1 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