feat: Add required environment variables for local debugging in .env generated by azd up #642
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
infra/main.bicepandinfra/main.jsonto 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]imageTagparameter 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:
SQL_SERVERtoSQL_SERVER_NAMEacross the GitHub Actions workflow (.github/workflows/CAdeploy.yml) and corresponding references, ensuring consistency and reducing confusion. [1] [2] [3] [4]infra/main.bicepto 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:
deploy_app_service.bicepmodule to acceptAppEnvironmentas a parameter and use it for theAPP_ENVapplication setting, allowing dynamic environment configuration (e.g., switching between 'Prod', 'Dev', etc.). [1] [2] [3] [4]deploy_ai_foundry.bicepfor easier integration with monitoring tools. [1] [2]Local Debugging Improvements:
Documentation Update:
.envfiles are generated and where to find environment-specific files when usingazd provisionorazd 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?
Golden Path Validation
Deployment Validation
What to Check
Verify that the following are valid: