Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
exam questions

Exam AZ-104 All Questions

View all questions & answers for the AZ-104 exam

Exam AZ-104 topic 2 question 7 discussion

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

HOTSPOT -
You have an Azure subscription that contains the resources shown in the following table:

You assign a policy to RG6 as shown in the following table:

To RG6, you apply the tag: RGroup: RG6.
You deploy a virtual network named VNET2 to RG6.
Which tags apply to VNET1 and VNET2? 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:
VNET1: Department: D1, and Label:Value1 only.
Tags applied to the resource group or subscription are not inherited by the resources.
Note: Azure Policy allows you to use either built-in or custom-defined policy definitions and assign them to either a specific resource group or across a whole
Azure subscription.
VNET2: Label:Value1 only.
Incorrect Answers:

RGROUP: RG6 -
Tags applied to the resource group or subscription are not inherited by the resources.
Reference:
https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/tag-policies

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
Parmjeet
Highly Voted 2 years, 4 months ago
Correct answer is: VNET1 will only have Department: D1 tag & VNET 2 will only have Label : Value1 tag
upvoted 336 times
XristophD
1 year, 10 months ago
agree, remediation task is needed to assign new tags to already existing resources (VNET1 existed before Policy was assigned), therefore VNET1 has no tags from the policy assigned. This would be the case if a remediation task has been performed on the policy assignment, but this was not mentioned in the question.
upvoted 22 times
...
Mucker973
2 years, 3 months ago
nope, your answer is incorrect and the answers given are correct. You are assuming that Dept: D1 overwrites label:value (well I assume you did based on your answer), but resources can have any amount of tags applied. PLUS I have confirmed this in a lab
upvoted 6 times
cnduknthm
1 year, 11 months ago
Its not about OVERWRITTING... Its about the assignment of policy. The policy applies to resources that are created only after policy was applied but VNET1 is created before assigning the policy to Resource Group and for that reason VNET1 has only one tag which is Department : D1
upvoted 10 times
...
amiban
1 year, 10 months ago
but can't be applied by policy, we need to be compliant while creating the resources wrt the tags.
upvoted 1 times
...
...
Dennis_SOn
2 years, 2 months ago
what is the answer? your answer seems not in the options?
upvoted 2 times
Dennis_SOn
2 years, 2 months ago
are you referring to this answer? tag. vnet1 : departement D1 tag only. VNET1 - Department: D1 only VNET2 - Label: Value1 only
upvoted 5 times
Dennis_SOn
2 years, 2 months ago
tag. vnet1 --- Department: D1 only. VNET1 - Department: D1 only VNET2 --- Label: Value1 only
upvoted 2 times
...
...
...
awssecuritynewbie
1 year, 12 months ago
this is wrong people do not like it!
upvoted 7 times
...
...
shash_ank
Highly Voted 2 years, 4 months ago
resources created before policy creation will not inherit the policy rules. so, VNET1 will only have Department: D1 tag, VNET 2 will have Label : Value1
upvoted 188 times
Bernard_2nd
2 years, 4 months ago
Agree with you too. The policy name "Apply tag and its default vualt" does not change previously tag of resource.
upvoted 6 times
...
Mucker973
2 years, 3 months ago
Correct, but it does say you create the resources AFTER the policy is created. Tbh the question is worded poorly and contradicts itself but it is implied the resources are created later.
upvoted 3 times
Wigoth
2 years, 2 months ago
Nope, VNET1 is already in place BEFORE the policy is created, so it doesn’t get the Label:value1 tag…
upvoted 6 times
...
pgmpp
2 years, 2 months ago
It does not specify anywhere that VNET1 is again created after the policy creation. Only VNET2 is created after the policy creation.
upvoted 4 times
...
...
Abiram
1 year, 5 months ago
Agree, I tested this on the portal and it works. BDW, there is no such policy called "Apply tag and its default value xxxx" - I can only see "Append tag and its default value xxxx" Perhaps Microsoft has renamed it recently?
upvoted 3 times
...
...
Chuong0810
Most Recent 2 days, 18 hours ago
VNET1: Inherits the policy tag (Label: Value1) Keeps its existing tag (Department: D1) Inherits the direct tag applied to RG6 (RGroup: RG6) Tags: Department: D1, RGroup: RG6, Label: Value1 VNET2: Inherits the policy tag (Label: Value1) Inherits the direct tag applied to RG6 (RGroup: RG6) Tags: RGroup: RG6, Label: Value1
upvoted 1 times
...
ThatDowntownSmell
2 weeks, 2 days ago
This is really easy to test. What came out of doing this for real (in the specific order that the question poses) with the policy "APPEND tag and its default value" is Vnet1 has only Department:D1, and Vnet2 has only Label:Value1. The text of the policy in the question does not match what is available in the policies in real life (append vs apply). In any case, here are the take-aways: Applying a tag to the resource group itself has no bearing on what the resources in the RG group get tagged with. Direct resource group tags are not inherited by resources in the group. Existing resources do not get the tagging applied when the policy is applied. Subsequent resources added after the policy is applied do get the tagging applied. It appears possible to create a policy that would create the tags on existing resources, but it requires usage of a managed identity; presumably this managed identity would be given access to modify the resources (as necessary to add and/or reset a tag+value).
upvoted 16 times
...
KSoul
2 weeks, 2 days ago
VNET1: Department: D1, and Label:Value1 only. VNET2: Label:Value1 only. Above answers are correct. Reason in simple wording - 1ST - Tags are not inherited to resources from Resource groups. But for first scenario there was no tag assigned to RG6 rather a Azure policy was applied to RG6. So for VNET1 the value is, it's own tags and azure policy tag that was applied to RG6 2ND - There was no tag assigned to VNET2. Forget about RGroup :RG6 tag because recourse group's tag is not inherited. As per Microsoft document, if no tag is applied to recourses, it add the label and value from the Recourse group's policy which was Label:Value1 in this case. Please read microsoft doc - Add a tag to resources ---> Adds the specified tag and value when any resource missing this tag is created or updated. Existing resources can be remediated by triggering a remediation task. If the tag exists with a different value it will not be changed. Does not modify tags on resource groups.
upvoted 8 times
...
SeMo0o0o0o
3 weeks, 3 days ago
Wrong VNET1: Department: D1 only VNET2: Label: Value1 only
upvoted 2 times
...
lewisjcsc300
1 month ago
Default tag policy comes into play when no tag has been applied. If vnet1 already had the tag department....the policy will no affect it. The policy will affect vnet2, policy will remediate/append the tag by adding the default tag; =value1
upvoted 1 times
...
SeMo0o0o0o
1 month ago
Wrong VNET1: Department: D1 only VNET2: Label: Value1 only
upvoted 1 times
...
3c5adce
4 months, 3 weeks ago
Finally the definitive answer. Thanks for sharing. VNET1 = Department:D1 VNET2 = Label: Value1
upvoted 6 times
...
Nushin
5 months, 3 weeks ago
Existing resources can be remediated by triggering a remediation task. If the tag exists with a different value it will not be changed. Does not modify tags on resource groups.
upvoted 1 times
...
tashakori
6 months, 3 weeks ago
- Department: D1 only - Label: Value1 only
upvoted 3 times
...
Pirand92
7 months, 2 weeks ago
About "To RG6, you apply the tag: RGroup: RG6." I think it should be "Department: D1 and RGroup: RG6 only". Let me know if i'm wrong in some way
upvoted 2 times
...
HdiaOwner
7 months, 3 weeks ago
D1 Value1
upvoted 1 times
...
MNotABot
7 months, 3 weeks ago
Instead of manually applying tags or searching for resources that aren't compliant, you create a policy that automatically applies the needed tags during deployment. Tags can also now be applied to existing resources with the new Modify effect and a remediation task.
upvoted 1 times
...
SkyZeroZx
9 months ago
Correct is VNET 1 : Department D1 only VNET2 : Label value1 only Because VNET 1 Previous Exist then policy does not effect in other resources
upvoted 2 times
...
Farkhan
10 months ago
Answer is correct, You use Azure Policy to enforce tagging rules and conventions. By creating a policy, you avoid the scenario of resources being deployed to your subscription that don't have the expected tags for your organization. Instead of manually applying tags or searching for resources that aren't compliant, you create a policy that automatically applies the needed tags during deployment. Tags can also now be applied to existing resources with the new Modify effect and a remediation task. The following section shows example policy definitions for tags.
upvoted 1 times
Helstrem
6 months, 1 week ago
But the question doesn't say anything about running a remediation task and without that the answer is different.
upvoted 1 times
...
...
sbnpj
11 months, 1 week ago
D1 tag only and Value1 tag
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 ...