Skip to content

Conversation

@mawasile
Copy link
Contributor

This pull request introduces enhancements to Azure resource management, diagnostics, and deployment automation, with improvements to infrastructure code, workflow automation, and documentation. The most significant changes include support for Log Analytics diagnostics, improved resource group management logic, updates to deployment scripts, and workflow reliability improvements.

Infrastructure and Diagnostics Enhancements:

  • Added support for provisioning a Log Analytics workspace (azurerm_log_analytics_workspace) and enabling diagnostic logging for storage account, blob, and file services, gated by the include_log_analytics variable. This allows for more robust monitoring and auditing of deployment artifacts and operations. [1] [2]
  • Updated naming logic to include a deterministic random seed based on the environment name, ensuring unique resource names across environments and added Log Analytics workspace to the naming resource. [1] [2] [3]

Resource Group Management:

  • Refactored resource group logic into a dedicated Terraform file (main.resource_group.tf), supporting both creation of new resource groups and usage of existing ones, with appropriate data source validation and output locals.
  • Removed duplicate resource group logic from the main Terraform file for clarity and maintainability.

Deployment Automation and Scripts:

  • Updated the deployment script for search index configuration to use an external shell script file (configure-search-index.sh) for better maintainability and modularity. Added additional environment variables for improved parameterization. [1] [2] [3]
  • Improved storage account configuration comments for deployment scripts, clarifying public network access and managed identity requirements.

Workflow Automation Improvements:

  • Enhanced the GitHub Actions workflow to run on pull requests targeting main, updated action versions for reliability, and changed .NET SDK installation to use a script for better compatibility with self-hosted runners. [1] [2] [3] [4]

Documentation Updates:

  • Added a troubleshooting guide (troubleshooting.md) with tips for quota errors, private endpoint provisioning, and using GitHub Copilot for deployment issues.
  • Minor documentation fixes for clarity in authentication and prerequisites. [1] [2]

…ainer

- Added a Log Analytics workspace resource to monitor deployment activities.
- Implemented diagnostic settings for the deployment container and blob service.
- Updated variables for log analytics retention and included options for enabling/disabling log analytics.
- Adjusted scale capacity for cognitive deployments to avoid exceeding quotas.
- Enhanced troubleshooting documentation for deployment errors and quota issues.
@mawasile mawasile requested a review from a team as a code owner October 14, 2025 10:53
Copilot AI review requested due to automatic review settings October 14, 2025 10:53
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request enhances the infrastructure monitoring and deployment capabilities by adding centralized Log Analytics diagnostics, improving resource management, and strengthening CI/CD workflows. The changes introduce comprehensive logging for Azure services while maintaining security best practices and deployment reliability.

Key changes:

  • Added Log Analytics workspace provisioning with configurable retention and diagnostic settings for storage services
  • Refactored resource group management into a dedicated file with improved logic for existing vs. new resource groups
  • Enhanced deployment scripts with external file organization and additional environment variables for better maintainability

Reviewed Changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
infra/variables.tf Added Log Analytics configuration variables with validation and reduced OpenAI default capacity
infra/main.tf Removed duplicate resource group logic in favor of dedicated file
infra/main.search_configuration.tf Added comprehensive diagnostic settings for storage services and externalized deployment script
infra/main.resource_group.tf New dedicated file for resource group management with improved conditional logic
infra/main.naming.tf Added deterministic random seed and Log Analytics workspace to naming convention
infra/main.app_insights.tf Added Log Analytics workspace resource with conditional provisioning
docs/troubleshooting.md New troubleshooting guide for common deployment issues
docs/cicd.md Minor documentation formatting fix
docs/app_registration_setup.md Updated authentication command with device code flag
.github/workflows/azure-dev.yml Enhanced workflow to support PR triggers and improved .NET SDK installation

mattdot
mattdot previously approved these changes Oct 15, 2025
@mawasile mawasile merged commit 2123669 into main Oct 15, 2025
12 checks passed
@mawasile mawasile deleted the mawasile/add-additional-logging-to-infra branch October 15, 2025 17:12
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.

4 participants