I would say that the correct answer is NO NO NO.
Box 1: instead of "netname" there should be the value of netname variable
Box 2: I don't see Resource Group mentioned anywhere in the template
Box 3: I don't see parameters being referred anywhere in the template, only variables are referred, e.g. "sku" variable.
Box 1: No - "netname" is the name of the variable
Box 2: No - the LB must be in the same region as the virtual network, but the Resource group can be anywhere
Box 3: No - There are no parameter defined in the template
You're wrong
Box 2 = YES
There's only one resource group specified: East US. So from the template it will be automatically assumed that it needs to find the resource in the one you're deploying to. reference: https://learn.microsoft.com/en-us/azure/azure-resource-manager/templates/template-functions-resource#remarks-3
For question 2:
This link (the error described in it and the cause for it described in the answer) suggest that the load balancer and the VNET must be in the same RG:
https://learn.microsoft.com/en-us/answers/questions/203973/problem-creating-an-azure-internal-load-balancer-w
So the answer to Q2 would be YES.
1: No
2: Yes -- I know its worded poorly, but for it to work the answer is yes it must be deployed there. I believe the intent is to demonstrate that it has to be in the same RG as VNET1, even though I know it wasn't called out what RG.
3: No
N,Y,N
Since VNET1 is supplied as a variable, it will search it in the RG you are deploying it to.
If it would need to be in another RG, you would need to specify the complete path no?
So it needs to be in the same RG as where you deploy the LB
Q2: NO
https://learn.microsoft.com/en-us/azure/load-balancer/move-across-regions-internal-load-balancer-portal
'Resource group to choose the resource group where the target load balancer will be deployed. You can select Create new to create a new resource group for the target internal load balancer or choose the existing resource group that was created above for the virtual network. Ensure the name isn't the same as the source resource group of the existing source internal load balancer.'
N,Y,N
Box1: As others have said. No, netname is the variable so App1
Box2: Yes. On creation you'll need to specify the vnet RG.
See below URL for reference.
https://learn.microsoft.com/en-us/azure/load-balancer/quickstart-load-balancer-standard-public-portal
Box 3: No, can't have a variable as a parameter.
I went through the linked page you provided, and while it chooses the same RG for vnet and load balancer, it might do that only for convenience. It does not state anywhere in that page that the RG must be the same.
NO-YES-NO
Yes, Azure Load Balancer must be in the same resource group as the virtual network (vnet) it is being used with. This is because Load Balancer is a resource that is used to distribute incoming network traffic across multiple virtual machines (VMs) in a backend pool. The VMs in the backend pool must also be in the same resource group as the Load Balancer and vnet.
When you create a Load Balancer, you must specify the vnet it will be used with, and the resource group that both the Load Balancer and vnet belong to. If you try to create a Load Balancer in a different resource group than the vnet, you will receive an error message.
It's important to note that while the Load Balancer and vnet must be in the same resource group, they can be in different regions. However, for optimal performance, it's recommended to keep them in the same region to minimize latency.
This is correct. Look at the third example here: https://learn.microsoft.com/en-us/azure/azure-resource-manager/templates/template-functions-resource#remarks-3
"To get the resource ID for a resource in the same subscription but different resource group, provide the resource group name."
So if you want to specify a resource which is in a different resource group than the one you are deploying to, you must specify the target resource group in the template as that example shows in the link. That was not done in the template for this question.
N - netname will be resolved to App1
Y - the answer uses incorrectly "the resource group" when "a resource group" was meant. It is obvious that a VNET with name VNET1 is needed here since it is the value of the variable. So this VNET must be present in whatever RG this will be deployed to. It does not matter that there is no mention of resource groups.
N - sku is not a parameter
Second box, Yes: if question is read as: "LB1 can be deployed only to a resource group that contains a VNET named VNET1" because ARM-templates requires a VNET named VNET1.
NNN is the answer.
https://learn.microsoft.com/en-us/azure/azure-resource-manager/templates/variables
https://learn.microsoft.com/en-us/azure/azure-resource-manager/templates/parameters
It's NO - YES - NO
Box 1: NO - the value of 'netname' is 'App1', so it's created in the App1 subnet (not netname)
Box 2: YES - There's no OTHER resource groups specified so it assumes it needs to find the resource in the one you're deploying to. reference: https://learn.microsoft.com/en-us/azure/azure-resource-manager/templates/template-functions-resource#remarks-3
Box 3: NO - 'sku' is a variable, not a parameter - so you can't use it as a parameter.
The resourceId property that the source that you reference is talking about is not mentioned in the template in the question. So I don't see how it applies here.
Ok, I didn't look properly at first, resourceId is mentioned in the variables section. I still don't see the added value of the source you quote - but I do agree that the correct answer would be NYN.
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.
Alandt
Highly Voted 1 year, 1 month agoFabrityDev
Highly Voted 2 years, 1 month agopino1
2 years, 1 month agoVinayV
1 year, 11 months agoIndy429
1 year, 2 months ago[Removed]
Most Recent 5 months agoTeerawee
6 months agoValB
1 year, 2 months agolebeyic620
11 months agoMEG_Florida
1 year, 6 months agoWimTS
1 year, 6 months agoJosete1106
1 year, 7 months agoAzure_2023
1 year, 7 months agoRandomNickname
1 year, 8 months agoValB
1 year, 2 months agoDoman01
1 year, 11 months agojodtzz
3 months, 4 weeks agosardonique
1 year, 5 months agowerdy92
2 years agoCyberKelev
2 years agoChakaZilly
2 years agozellck
2 years agozellck
2 years agoDeBoer
2 years agoBatiste2023
1 year, 3 months agoBatiste2023
1 year, 3 months agoMo22
2 years, 1 month ago