Solution#45
Conversation
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
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
| -DestinationPortRange 443,80 | ||
|
|
||
| $webserverNsg = New-AzNetworkSecurityGroup ` | ||
| -Name "webservers-nsg" ` |
There was a problem hiding this comment.
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.
| -DestinationPortRange 22 | ||
|
|
||
| $managementNsg = New-AzNetworkSecurityGroup ` | ||
| -Name "management-nsg" ` |
There was a problem hiding this comment.
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".
| Write-Host "Creating dbSubnet network security group..." | ||
| # Write your code for creation of management NSG here -> | ||
| $dbNsg = New-AzNetworkSecurityGroup ` | ||
| -Name "database-nsg" ` |
There was a problem hiding this comment.
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
left a comment
There was a problem hiding this comment.
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! ✨
No description provided.