Skip to content

Solution#45

Closed
vsupruniuk wants to merge 2 commits into
mate-academy:mainfrom
vsupruniuk:development
Closed

Solution#45
vsupruniuk wants to merge 2 commits into
mate-academy:mainfrom
vsupruniuk:development

Conversation

@vsupruniuk

Copy link
Copy Markdown

No description provided.

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Summary

Great work on implementing the security rules for the subnets! The logic for allowing and blocking traffic is correctly configured. However, this requires changes because the Network Security Groups (NSGs) are not named according to the task requirements. The requirement specifies that each NSG's name must be identical to its corresponding subnet's name. Currently, your script adds a -nsg suffix to each name (e.g., webservers-nsg instead of webservers). Please update the -Name parameter in your New-AzNetworkSecurityGroup commands in task.ps1 to use the subnet name variables directly, without the suffix. Once that's fixed, your solution will be perfect!


✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨

Important

Fix the issues, commit the changes, and then re-request my review using the Re-request review button2 in the Reviewers tab.

Tip

If you have any comments about this review, please leave a message in the Add a comment section below and mention me with the @mateacademy-ai-mentor tag3.
I will read your message during my next review of your pull request. Please do not reply directly to my comments, as that feature is not supported yet.

Caution

Do not close the pull request until the review is complete. Closing it early can lead to unexpected behavior and disrupt the review process.

Footnotes

  1. Rate AI review example

  2. Re-request AI review example

  3. Add AI review comments example

Comment thread task.ps1 Outdated
-DestinationPortRange 443,80

$webserverNsg = New-AzNetworkSecurityGroup `
-Name "webservers-nsg" `

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The requirement states that the NSG name must be the same as the subnet's name. The subnet name is "webservers" (defined in the $webSubnetName variable), but the NSG is named "webservers-nsg". Consider using the $webSubnetName variable directly for the -Name parameter to ensure it matches.

Comment thread task.ps1 Outdated
-DestinationPortRange 22

$managementNsg = New-AzNetworkSecurityGroup `
-Name "management-nsg" `

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The task requires the NSG name to be identical to its corresponding subnet name. The subnet name is "management" (from the $mngSubnetName variable), but you've named the NSG "management-nsg". Please correct this to "management".

Comment thread task.ps1 Outdated
Write-Host "Creating dbSubnet network security group..."
# Write your code for creation of management NSG here ->
$dbNsg = New-AzNetworkSecurityGroup `
-Name "database-nsg" `

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to the task requirements, the NSG name should be exactly the same as its subnet's name. The subnet is named "database" (from the $dbSubnetName variable), so the NSG should also be named "database", not "database-nsg".

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Summary

Excellent work on this revision! You've successfully addressed the feedback from the previous review by ensuring the Network Security Group names now perfectly match the subnet names. Your PowerShell script correctly implements all the required security rules for each subnet, fully meeting all task requirements. The solution is now complete and well-executed, so I am approving this submission. Great job!


✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨

Footnotes

  1. Rate AI review example

@vsupruniuk vsupruniuk closed this by deleting the head repository May 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants