Skip to content

add solutuon#64

Open
taniakolesnik wants to merge 2 commits into
mate-academy:mainfrom
taniakolesnik:main
Open

add solutuon#64
taniakolesnik wants to merge 2 commits into
mate-academy:mainfrom
taniakolesnik:main

Conversation

@taniakolesnik

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

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

  1. Rate AI review example

  2. Re-request AI review example

  3. Add AI review comments example

Comment thread main.tf
Comment thread main.tf
Comment thread main.tf
Comment thread .gitignore
Comment thread .gitignore
Comment thread install-app.sh
Comment thread install-app.sh
Comment thread install-app.sh
Comment thread install-app.sh
Comment thread install-app.sh
Comment thread install-app.sh
Comment thread backend.tf Outdated
Comment thread backend.tf Outdated
Comment thread backend.tf Outdated
Comment thread backend.tf Outdated
Comment thread backend.tf Outdated
Comment thread modules/compute/variables.tf
Comment thread modules/compute/variables.tf
Comment thread modules/compute/main.tf
Comment thread modules/compute/main.tf
Comment thread modules/compute/main.tf
Comment thread modules/network/main.tf
Comment thread modules/network/variables.tf
Comment thread modules/network/variables.tf
Comment thread modules/storage/variables.tf
Comment thread modules/storage/variables.tf
Comment thread modules/storage/main.tf
Comment thread modules/storage/main.tf
Comment thread variables.tf
Comment thread variables.tf

@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

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

  1. Rate AI review example

Comment thread modules/compute/main.tf
Comment on lines +40 to +62

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
})

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 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.

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