Skip to content

Conversation

@Prasanjeet-Microsoft
Copy link
Contributor

Purpose

This pull request introduces several improvements and refactors to the infrastructure deployment scripts and configuration files, focusing on parameterization, environment variable consistency, and output expansion. The main goals are to make deployments more flexible, maintainable, and to surface more useful output variables for downstream consumers. Below are the most important changes grouped by theme:

Parameterization and Variable Refactoring:

  • Refactored hardcoded values in infra/main.bicep and infra/main.json to use variables for commonly reused configuration items (e.g., hostingPlanName, websiteName, appEnvironment, and various Azure Search/OpenAI parameters), improving maintainability and flexibility. [1] [2] [3] [4]
  • Added a new imageTag parameter with a description for Docker image deployments, making it clearer and easier to specify which image version to deploy. [1] [2]

Environment Variable and Output Consistency:

  • Standardized SQL server environment variable naming from SQL_SERVER to SQL_SERVER_NAME across the GitHub Actions workflow (.github/workflows/CAdeploy.yml) and corresponding references, ensuring consistency and reducing confusion. [1] [2] [3] [4]
  • Expanded outputs in infra/main.bicep to include a comprehensive set of environment variables and connection strings for downstream use, such as Application Insights keys, Cosmos DB info, AI endpoints, and more.

Application Settings and Deployment Improvements:

  • Modified the deploy_app_service.bicep module to accept AppEnvironment as a parameter and use it for the APP_ENV application setting, allowing dynamic environment configuration (e.g., switching between 'Prod', 'Dev', etc.). [1] [2] [3] [4]
  • Added output of the Application Insights instrumentation key in deploy_ai_foundry.bicep for easier integration with monitoring tools. [1] [2]

Local Debugging Improvements:

  • Ensured that all environment variables required for local debugging are automatically included in the .env file generated by azd up or azd provision. This streamlines the setup process for local development, allowing developers to start and debug the application locally with minimal manual configuration.

Documentation Update:

  • Updated the local setup documentation to clarify how .env files are generated and where to find environment-specific files when using azd provision or azd up.

These changes collectively make the infrastructure codebase more modular, easier to configure for different environments, and improve the developer experience during both deployment and local setup.

Does this introduce a breaking change?

  • Yes
  • No

Golden Path Validation

  • I have tested the primary workflows (the "golden path") to ensure they function correctly without errors.

Deployment Validation

  • I have validated the deployment process successfully and all services are running as expected with this change.

What to Check

Verify that the following are valid:

  • Ensure deployments (via both GitHub Actions and azd CLI) work as expected in all supported environments.
  • Validate that the .env file generated by azd up contains all required variables for local debugging, and application starts up successfully with those.
  • Confirm that documentation changes are clear for new and existing developers.
  • Test that scripts and workflows referencing updated variable names (e.g., SQLDB_SERVER_NAME) work correctly.
  • Review that outputs in Bicep and JSON templates are wired as expected and no breaking changes are introduced for existing deployments.

@Prajwal-Microsoft Prajwal-Microsoft merged commit 12b99bb into dev Aug 8, 2025
6 checks passed
@github-actions
Copy link

🎉 This PR is included in version 1.9.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants