Skip to content

Dev#56

Open
dimak20 wants to merge 8 commits into
mate-academy:mainfrom
dimak20:dev
Open

Dev#56
dimak20 wants to merge 8 commits into
mate-academy:mainfrom
dimak20:dev

Conversation

@dimak20

@dimak20 dimak20 commented Mar 15, 2026

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

Your project has a great structure with well-organized modules. However, several key requirements are not met, which prevents the infrastructure from being deployed as specified.

Here are the changes needed:

  • Resource Group: In main.tf, the resource group should be created with a resource "azurerm_resource_group" block, not fetched with a data source.
  • Configuration Values: The terraform.tfvars file needs to be updated. The location must be "uksouth" and the vm_size must be "Standard_B1s".
  • Public IP: The public IP in modules/network/main.tf must use Dynamic allocation instead of Static. This will also require changing the sku to Basic or removing it.
  • Deployment Script: The install-app.sh script has a path mismatch. The cp command's source directory must match the directory created by the git clone command.
  • Backend: The storage_account_name in backend.tf needs to be updated to "yourstorageaccount" as per the task instructions.

Please address these points to align the configuration with the task requirements.


✨ 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 main.tf
Comment on lines +1 to +3
resource "azurerm_resource_group" "rg" {
name = var.resource_group_name
location = var.location

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 creating all necessary resources, including the resource group. This data block fetches an existing resource group instead of creating a new one. You should use an azurerm_resource_group resource block to create the group managed by this Terraform configuration.

Comment thread backend.tf Outdated

backend "azurerm" {
resource_group_name = "mate-azure-task-12"
storage_account_name = "dimak300"

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 storage_account_name for the backend should be yourstorageaccount. Please update this value to match the instructions.

Comment thread install-app.sh Outdated
Comment on lines 16 to 17
git clone https://github.com/dimak20/azure_task_12_deploy_app_with_vm_extention.git
cp -r devops_todolist_terraform_task/app/* /app

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 git clone command creates a directory based on the repository name, which is azure_task_12_deploy_app_with_vm_extention. However, the cp command on the next line references a different directory, devops_todolist_terraform_task. This path mismatch will cause the script to fail because the source directory won't be found.

Comment thread modules/compute/main.tf Outdated
location = var.location
resource_group_name = var.resource_group_name
network_interface_ids = [azurerm_network_interface.nic.id]
vm_size = var.vm_size

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 requirements specify that the virtual machine size must be Standard_B1s. While using a variable here is good practice, the value provided in your terraform.tfvars file is Standard_D2s_v3, which does not meet the requirement.

Comment thread modules/compute/main.tf Outdated
Comment on lines +22 to +27
storage_image_reference {
publisher = "Canonical"
offer = "0001-com-ubuntu-server-jammy"
sku = "22_04-lts"
version = "latest"
}

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 is to use an Ubuntu2204 image. While this image reference works, you are using a non-standard offer and SKU. For better compatibility and to follow best practices, consider using the official marketplace image with offer = "UbuntuServer" and sku = "22.04-LTS".

Comment thread modules/network/main.tf Outdated
Comment on lines +72 to +73
allocation_method = "Static"
sku = "Standard"

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 public IP address to use a dynamic allocation method. Please change this from Static to Dynamic to meet the requirement. Additionally, the Standard SKU only supports Static allocation. You will need to either remove the sku line (which defaults to Basic, supporting dynamic allocation) or explicitly set it to Basic.

Comment thread terraform.tfvars Outdated
@@ -0,0 +1,14 @@
location = "westeurope"

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 description specifies that the location should be uksouth. Please update this value.

Comment thread terraform.tfvars Outdated
network_security_group_name = "defaultnsg"
public_ip_address_name = "linuxboxpip"
vm_name = "matebox"
vm_size = "Standard_D2s_v3"

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 virtual machine size (vm_size) should be Standard_B1s. The current value does not meet this requirement.

@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 job addressing the previous feedback! The project is very close to completion, but there are two critical issues that need to be fixed before this can be approved.

  1. Invalid Public IP Configuration: In modules/network/main.tf, the azurerm_public_ip resource is configured with sku = "Standard" and allocation_method = "Dynamic". This is an invalid combination in Azure and will cause the deployment to fail. To fix this, please change the sku to "Basic", which is compatible with dynamic allocation.

  2. Incorrect Deployment Script Path: The cp command in install-app.sh will fail because the source path is incorrect. The git clone command creates a directory, so you need to update the path to include it, for example: cp -r azure_task_12_deploy_app_with_vm_extention/devops_todolist_terraform_task/app/* /app.

Once you've addressed these two points, the deployment should succeed. Keep up the great work!


✨ 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 install-app.sh Outdated
# make sure to uncomment the line bellow and update the link with your GitHub username
# git clone https://github.com/<your-gh-username>/azure_task_12_deploy_app_with_vm_extention.git
git clone https://github.com/dimak20/azure_task_12_deploy_app_with_vm_extention.git
cp -r devops_todolist_terraform_task/app/* /app

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This copy command will fail because the source path is incorrect. The git clone command creates a directory named azure_task_12_deploy_app_with_vm_extention, and the devops_todolist_terraform_task directory is inside it. The path needs to be updated to reflect this structure, for example: azure_task_12_deploy_app_with_vm_extention/devops_todolist_terraform_task/app/*.

Comment thread modules/network/main.tf Outdated
location = var.location
resource_group_name = var.resource_group_name
allocation_method = "Dynamic"
sku = "Standard"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This configuration will cause an error during deployment. A public IP with a Dynamic allocation method cannot have a Standard SKU. According to the task requirements and Azure constraints, you should use the Basic SKU for dynamic allocation.

@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 project! You've successfully addressed all the previous feedback, and the Terraform configuration now perfectly aligns with all the task requirements. The project is well-structured, uses modules effectively, and demonstrates a solid understanding of deploying infrastructure on Azure. I am happy to approve your submission. Keep up the great work!


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

Footnotes

  1. Rate AI review example

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