Skip to content

fix: Replace Bicep DeploymentScripts with post-deployment setup scripts#2153

Merged
Roopan-Microsoft merged 13 commits intoAzure-Samples:devfrom
Abdul-Microsoft:psl-postdeployment-script
Apr 9, 2026
Merged

fix: Replace Bicep DeploymentScripts with post-deployment setup scripts#2153
Roopan-Microsoft merged 13 commits intoAzure-Samples:devfrom
Abdul-Microsoft:psl-postdeployment-script

Conversation

@Abdul-Microsoft
Copy link
Copy Markdown
Contributor

Purpose

  • This pull request introduces a new post-deployment setup process for configuring the Function App client key and creating PostgreSQL tables, and updates documentation to guide users through these steps. It also removes deployment-time scripts and parameters related to PostgreSQL table creation from the infrastructure code, delegating this responsibility to the new post-deployment script. Additionally, a new Python script is added to automate PostgreSQL table setup, and several documentation files are updated with clear instructions for running these scripts. Minor infrastructure cleanups and simplifications are also included.

Post-deployment automation and documentation:

  • Added a new Python script, setup_postgres_tables.py, which creates required PostgreSQL tables and vector extension for chat and vector storage, authenticating with Azure credentials.
  • Updated documentation (README.md, docs/AVMPostDeploymentGuide.md, docs/LOCAL_DEPLOYMENT.md, docs/NON_DEVCONTAINER_SETUP.md) to instruct users to run the post-deployment setup script for configuring the Function App client key and setting up PostgreSQL tables, including handling of private networking scenarios. [1] [2] [3] [4] [5]

Infrastructure (Bicep) simplification and cleanup:

  • Removed deployment-time scripts (pgSqlDelayScript, createIndex) and associated parameters for PostgreSQL table creation from infra/main.bicep and infra/modules/app/function.bicep, as this is now handled post-deployment. [1] [2] [3] [4]
  • Removed the clientKey parameter and its assignment from the Function App module, as it is now set up post-deployment. [1] [2]
  • Cleaned up virtual network module by removing the deployment-scripts subnet and associated outputs, which are no longer needed. [1] [2]

Minor infrastructure updates:

  • Simplified tag assignment in the resource group tags module for improved readability.
  • Removed an unused baseUrl variable from infra/main.bicep.

Does this introduce a breaking change?

  • Yes
  • No

How to Test

  • Get the code
git clone [repo-address]
cd [repo-name]
git checkout [branch-name]
npm install
  • Test the code

What to Check

Verify that the following are valid

  • ...

Other Information

Roopan-Microsoft and others added 3 commits April 6, 2026 05:24
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Ajit Padhi <v-padhiajit@microsoft.com>
Co-authored-by: Pavan-Microsoft <v-kupavan@microsoft.com>
Co-authored-by: Ross Smith <ross-p-smith@users.noreply.github.com>
Co-authored-by: gpickett <122489228+gpickett@users.noreply.github.com>
Co-authored-by: Francia Riesco <friesco@microsoft.com>
Co-authored-by: Francia Riesco <Fr4nc3@users.noreply.github.com>
Co-authored-by: Prajwal D C <v-dcprajwal@microsoft.com>
Co-authored-by: Harmanpreet-Microsoft <v-harmanprka@microsoft.com>
Co-authored-by: UtkarshMishra-Microsoft <v-utkamishra@microsoft.com>
Co-authored-by: Priyanka-Microsoft <v-prisinghal@microsoft.com>
Co-authored-by: Prasanjeet-Microsoft <v-singhprasa@microsoft.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Kiran-Siluveru-Microsoft <v-ksiluveru@microsoft.com>
Co-authored-by: Prashant-Microsoft <v-pmalusare@microsoft.com>
Co-authored-by: Rohini-Microsoft <v-rwalunj@microsoft.com>
Co-authored-by: Avijit-Microsoft <v-aghorui@microsoft.com>
Co-authored-by: RaviKiran-Microsoft <v-ravikirans@microsoft.com>
Co-authored-by: Somesh Joshi <v-somejoshi@microsoft.com>
Co-authored-by: Himanshi Agrawal <v-himagrawal@microsoft.com>
Co-authored-by: pradeepjha-microsoft <v-pradeepjha@microsoft.com>
Co-authored-by: Harmanpreet Kaur <v-harmanpkau@microsoft.com>
Co-authored-by: Bangarraju-Microsoft <v-golib@microsoft.com>
Co-authored-by: Harsh-Microsoft <v-hbangera@microsoft.com>
Co-authored-by: Kanchan-Microsoft <v-knagshetti@microsoft.com>
Co-authored-by: Cristopher Coronado <cristofima@hotmail.com>
Co-authored-by: Cristopher Coronado Moreira <crcorona@pichincha.com>
Co-authored-by: Vamshi-Microsoft <v-vamolla@microsoft.com>
Co-authored-by: Thanusree-Microsoft <168087422+Thanusree-Microsoft@users.noreply.github.com>
Co-authored-by: Niraj Chaudhari (Persistent Systems Inc) <v-nirajcha@microsoft.com>
Co-authored-by: Rohini-Microsoft <168007985+Rohini-Microsoft@users.noreply.github.com>
Co-authored-by: Kingshuk-Microsoft <v-kidatta@microsoft.com>
Co-authored-by: Ayaz-Microsoft <v-ayazkhan@microsoft.com>
Co-authored-by: Abdul-Microsoft <v-amujeebta@microsoft.com>
Co-authored-by: Prekshith-Microsoft <v-pdj@microsoft.com>
Co-authored-by: Rafi-Microsoft <v-rafmd@microsoft.com>
Co-authored-by: Ragini-Microsoft <v-raginich@microsoft.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Atulku-Microsoft <v-atulku@microsoft.com>
Co-authored-by: Akhileswara-Microsoft <v-golnaidu@microsoft.com>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@Abdul-Microsoft Abdul-Microsoft changed the title fix: Migrate DeploymentScript Resources from Bicep to Post-Deployment Scripts fix: Replace Bicep DeploymentScripts with post-deployment setup scripts Apr 7, 2026
Add Windows/Linux/macOS/WSL labels next to PowerShell and Bash script
commands so non-technical users know which script to use for their OS.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@Roopan-Microsoft Roopan-Microsoft merged commit 26298b8 into Azure-Samples:dev Apr 9, 2026
7 checks passed
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.

3 participants