refactor: refactoring infra for template validation #291
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 infrastructure improvements and refactorings to the Azure deployment configuration for the Content Processing Solution Accelerator. The most significant changes include the addition of purge protection as a configurable parameter, refactoring of the AI services module, and updates to output and environment variable handling. These changes improve the flexibility, reliability, and maintainability of the deployment process.
Parameter and Output Improvements
enablePurgeProtectionparameter to bothinfra/main.bicepandinfra/main.json, allowing users to optionally enable purge protection for applicable resources. The parameter is now passed through to the app configuration module, ensuring consistent behavior. [1] [2] [3] [4]resourceGroupNametoAZURE_RESOURCE_GROUPin both Bicep and JSON templates for clarity and consistency. [1] [2]Module Refactoring
modules/account/main.biceptomodules/account/aiservice.bicepand explicitly set the deployment scope toresourceGroup()to improve modularity and deployment control. [1] [2]Environment Variable and Value Handling
APP_AI_PROJECT_ENDPOINTenvironment variable to safely handle missing values using optional chaining and fallback defaults in both Bicep and JSON templates. [1] [2]Deployment Script and Hook Updates
azure.yamlfrompostdeploytopostprovisionand refactored the shell commands to invoke dedicated post-deployment scripts for both POSIX and Windows environments, improving maintainability and cross-platform compatibility.These updates collectively enhance the deployment process by making it more configurable, robust, and maintainable.
Does this introduce a breaking change?
Golden Path Validation
Deployment Validation
What to Check
Verify that the following are valid
Other Information