add solutuon#64
Conversation
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
This implementation has critical blocking issues that prevent task completion. The check run failed because main.tf is missing the required azurerm_resource_group resource block. Additionally, the backend configuration is entirely commented out when remote state storage is explicitly required. Several essential files are missing: the root outputs.tf (for public IP verification), root terraform.tfvars (for variable values including SSH key), and root variables.tf is incomplete with only 2 of 12+ required variables defined. The VM extension executes inline commands instead of the required install-app.sh script, and the network module only outputs subnet_id while needing public_ip_address and public_ip_fqdn for verification. The storage account name also mismatches between the backend and storage module. These issues must be resolved before the configuration can be approved.
✨ 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
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
The script URL is valid and accessible.
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
Footnotes
|
|
||
| resource "azurerm_virtual_machine_extension" "example" { | ||
| name = "hostname" | ||
| virtual_machine_id = azurerm_linux_virtual_machine.example.id | ||
| publisher = "Microsoft.Azure.Extensions" | ||
| type = "CustomScript" | ||
| type_handler_version = "2.0" | ||
|
|
||
| settings = jsonencode({ | ||
| commandToExecute = <<-EOT | ||
| apt-get update -yq | ||
| apt-get install python3-pip git -yq | ||
|
|
||
| mkdir -p /app | ||
| git clone https://github.com/taniakolesnik/azure_task_12_deploy_app_with_vm_extention.git /tmp/apprepo | ||
| cp -r /tmp/apprepo/devops_todolist_terraform_task/app/* /app | ||
|
|
||
| mv /app/todoapp.service /etc/systemd/system/ | ||
| systemctl daemon-reload | ||
| systemctl start todoapp | ||
| systemctl enable todoapp | ||
| EOT | ||
| }) |
There was a problem hiding this comment.
The task requirement explicitly states: 'VM Extension: use the CustomScript extension to execute install-app.sh script.' Currently, the extension has inline commands that duplicate the script content. Instead, use fileUris to reference the script (e.g., from a storage account blob URL) and commandToExecute = "bash install-app.sh" to execute it. This ensures the actual script file is used rather than duplicated inline commands.
No description provided.