exam questions

Exam AZ-104 All Questions

View all questions & answers for the AZ-104 exam

Exam AZ-104 topic 2 question 95 discussion

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

HOTSPOT
-

You purchase a new Azure subscription.

You create an Azure Resource Manager (ARM) template named deploy.json as shown in the following exhibit.



You connect to the subscription and run the following command.

New-AzDeployment –Location westus –TemplateFile “deploy.json”

For each of the following statements, select Yes if the statement is true. Otherwise, select No.

NOTE: Each correct selection is worth one point.

Show Suggested Answer Hide Answer
Suggested Answer:

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
trferreiraBR
Highly Voted 1 year, 2 months ago
NNY - I run the ARM template in a lab environment. Before go to the explanation, it's valid to say that there are some errors in the script format and I have to fix it to run successfully. 1- It's N, because it creates 4 Resource Groups and not 3 Resource Groups (RGS0, RGS1, RGroup4 and ResGrp8); 1.1: The Resource Group named with "[concat('RGS', copyIndex())]", creates RGS0 and RGS1; 1.2: The Resource Group named with "[concat('ResGrp', '8')]", creates ResGrp8; 1.3: The Resource Group named with "[concat('RGroup', length(parameters('obj1')))]", creates RGroup4 (As we can see, obj1 parameter has a length of 4 'propA', 'propB', 'propC' and 'propD'); 2 - It's N, because it doesn't create a resourcer group named RGroup5; 3 - It's Y, because all resource groups were created in the East US Azure Region.
upvoted 89 times
Archangel0007
1 year, 2 months ago
for the third one u give the input parameter as westus so it has to be No right ?
upvoted 1 times
trferreiraBR
1 year, 1 month ago
No. It's is different! When you specify the location with a template, the location tells Azure Resource Manager where to store the deployment data. "For subscription level deployments, you must provide a location for the deployment. The location of the deployment is separate from the location of the resources you deploy. The deployment location specifies where to store deployment data. Management group and tenant deployments also require a location. For resource group deployments, the location of the resource group is used to store the deployment data." References: https://learn.microsoft.com/en-us/powershell/module/az.resources/new-azdeployment?view=azps-10.4.1#description https://learn.microsoft.com/en-us/azure/azure-resource-manager/templates/deploy-to-subscription?tabs=azure-cli#deployment-location-and-name
upvoted 14 times
Highgate
3 months, 3 weeks ago
Excellent answer
upvoted 1 times
...
...
...
fomedad
1 year, 2 months ago
Why The Resource Group named with "[concat('RGS', copyIndex())]", creates RGS0 and RGS1?
upvoted 4 times
ubiquituz
1 year ago
because of the "copy" and "count" property copy...means the 1st created resource group should be duplicated count...how manytimes should it be duplicated..."2" (twice) and [concat('RGS', copyIndex())] means the name of the created RGs should be derived from joining (concat) the words (string) "RGS" with the copyindex number of each created RG (ie 1st created RG...copyindex number "0", 2nd created RG copyindex number "1")....as we all know counting in prog lang. often begin with 0, 1, 2 and not 1
upvoted 7 times
ubiquituz
1 year ago
count: how many instance of the RG should exist...sorry my english isnt too good
upvoted 2 times
...
...
pharsat
1 year, 1 month ago
Count property
upvoted 4 times
...
...
nsss
1 year ago
If it doesn't run successfully because of the errors, shouldn't you just say no to all? You are not supposed to assume that the errors are fixed when running it.
upvoted 3 times
ggogel
1 year ago
Just from looking at it, I can see at least one error, which is the reference of "par1", written as "part1".
upvoted 2 times
nuel_12
11 months, 1 week ago
microsoft willfully put it like that because the is default value for location which is "EAST US" if a location is not specify or empty it will default to that or wrong specification
upvoted 1 times
...
...
c5ad307
10 months, 3 weeks ago
You can also assume that it is a transcription error. Just consider both possibilities when taking the exam and read carefully
upvoted 2 times
...
...
...
forkie
Highly Voted 1 year, 2 months ago
NNY, 1: No, to my count there will be 4 resources deployed 2: No, the length(parameters('obj1')) count will result in 4, as there are top-level properties. 3: Yes, the -location parameter given only effects what region the deployment would happen in, the resourcses location are defined by the template, and in this case the first two get an explicit eastus, the second refers to the last item in the list which is eastus and the third gets the default value of it which is again eastus
upvoted 8 times
neolisto
1 year, 1 month ago
1: there is a typo mistake in 1-st RG but I still wondering, how did you get 4 resource groups?
upvoted 1 times
Indy429
12 months ago
There's 3 RGs in the template for East-Us. Hence, if you create 1 RG for West-US, it would be the 4th RG
upvoted 1 times
...
...
...
SeMo0o0o0o
Most Recent 3 months, 1 week ago
WRONG No No Yes
upvoted 1 times
SeMo0o0o0o
3 months ago
..................
upvoted 1 times
...
...
AlbertKwan
6 months ago
NNN - because in Line 35, the text "resrouceGroup" is wrong.
upvoted 4 times
...
varinder82
7 months ago
Final Answer: 'Yes No No
upvoted 1 times
...
3c5adce
7 months ago
ChatGPT4 says Yes No No
upvoted 1 times
semse27
6 months, 2 weeks ago
mine says no no yes
upvoted 2 times
...
...
3c5adce
7 months ago
Went through comments - most popular answer is NNY
upvoted 1 times
...
devilish84
7 months, 1 week ago
There is a mistake on line 17, it should be part (referred on line 53). If you try to deploy the file above it won't work. If you change line 53 part1 -> part. You will have the following results: Name=RGroup4, Location=East US Name=RGS1, Location=East US Name=ResGrpv8, Location=East US Name=RGS0, Location=East US Therefore: Question Number 1: NO (Notify line number 41, RGS0 and RGS1 will be created). Plus 2 other resource. Question Number 2: NO (obj1 contains only 4 parameters, propA-D) Question Number 3: YES
upvoted 3 times
mercerc1
21 hours, 3 minutes ago
I typed out this JSON by hand in VS code (which makes mistakes easier to see). There are numerous mistakes/typos in the code (3 or 4 I think). Once I fixed those, I ran the command as shown in the question. It created four resource groups all in 'East US'. The names are: ResGrp8 RGroup4 RGS0 RGS1 Therefore the answer is indeed NNY like devilish84 said.
upvoted 1 times
...
...
5faef8c
7 months, 2 weeks ago
NNN as written because of syntax errors, it fails until all are fixed Fixing: "location": "[parameters('part1')]" to "location": "[parameters('par1')]" "type": "Microsoft.Resources/resrouceGroups" to "type": "Microsoft.Resources/resourceGroups" Yields: No – It creates 4 – RGS0, RGS1, ResGrp8, RGroup4 (len of PropA-D) No – See above Yes – tested in Lab
upvoted 2 times
...
foves65810
8 months, 1 week ago
NNY N: Two copies + two groups (total 4) N: RGS 0, RGS 1, ResGrp 8, RGroup 4 Y: Location eastus, last() takes last value from array so eastus, deafaultvalue eastus
upvoted 1 times
...
prshntdxt7
8 months, 2 weeks ago
lot of confusion around these Yes-No questions. Folks who don't know the correct answer kindly refrain providing your inputs here. Neither the ChatGPT plethora of knowledge is needed here. please, don't add to confusion, this az-104 is the only exam on ET where i see people creating a mess.
upvoted 2 times
...
bobothewiseman
8 months, 2 weeks ago
Answer is NNN 1st box : 4 resource groups (RGS0, RGS1, RGroup4 and ResGrp8) 2nd box: RGS0, RGS1, RGroup4 and ResGrp8 3rd box: all resources groups were created in West US the location specified in the deployment command acts as the target deployment location for the entire deployment process, and all resources defined within the ARM template will be deployed to that specified location, regardless of any location properties defined within the individual resource definitions in the template. https://learn.microsoft.com/en-us/powershell/module/az.resources/new-azdeployment?view=azps-10.4.1#description https://learn.microsoft.com/en-us/azure/azure-resource-manager/templates/deploy-to-subscription?tabs=azure-cli#deployment-location-and-name
upvoted 1 times
...
Amir1909
8 months, 3 weeks ago
No No Yes
upvoted 1 times
...
adilkhan
10 months, 3 weeks ago
answer is N N Y
upvoted 2 times
...
SkyZeroZx
11 months, 1 week ago
N : Because resource first has a copy property then create groups size is 4 N : Is obvious not exist RGroup 5 for the conditions Y : All resource is create East accordint the ARM
upvoted 3 times
...
alonedave
1 year ago
YNY There is a typo on the par1 reference to the 4th RGS, so only three RGs would be deployed. The other three would be deployed on East US
upvoted 1 times
ggogel
1 year ago
With that typo, the template would not execute.
upvoted 1 times
Isumby10
1 year ago
bro stop killing the excitement of learning.. you are literally creating a whole discussion just for a TYPO?? ???????????????????
upvoted 3 times
AlbertKwan
6 months ago
Obviously you are wishful that the compiler/interpreter has intelligence to correct typos...
upvoted 1 times
...
...
...
...
esetyanto
1 year, 2 months ago
N - spelling mistake on first resource group N - RGroup4 N - spelling mistake on the param
upvoted 5 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