Skip to content

Add Azure Function App deployment infrastructure per environment#74

Merged
fpittelo merged 6 commits intodevfrom
copilot/add-azure-function-deployment
Nov 23, 2025
Merged

Add Azure Function App deployment infrastructure per environment#74
fpittelo merged 6 commits intodevfrom
copilot/add-azure-function-deployment

Conversation

Copy link
Contributor

Copilot AI commented Nov 23, 2025

The repository contained Azure Function code (backend/function_app.py) with the /api/chat endpoint but lacked infrastructure and deployment workflows to actually deploy it, breaking the link between frontend and Azure OpenAI.

Changes

Infrastructure (Terraform)

  • New modules/function_app module: provisions Storage Account + Linux Function App (Python 3.12)
  • Added Function App resources to all environments (dev, qa, main) with environment-specific API versions
  • CORS validation prevents wildcard origins; explicit URLs required
  • Function Apps auto-configured with Azure OpenAI credentials from infrastructure

Deployment

  • New workflow deploy-function.yaml for standalone Function App deployments
  • Updated orchestrator workflow: Backend Storage → Infrastructure → Function App → Frontend
  • Pip dependencies installed correctly for Azure Functions runtime

Configuration per Environment

dev:  dev-alpinebot-func  (API v2024-02-15-preview)
qa:   qa-alpinebot-func   (API v2024-08-01-preview)
main: main-alpinebot-func (API v2024-08-01-preview)

Security

  • CORS wildcard * blocked via Terraform validation
  • Configurable API versions per environment (preview in dev, stable in qa/main)
  • Secrets flow: GitHub Secrets → Terraform → Function App environment variables

Result

Each environment now deploys a Function App at https://{env}-alpinebot-func.azurewebsites.net/api/chat connecting the React frontend to Azure OpenAI service.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • checkpoint-api.hashicorp.com
    • Triggering command: /usr/local/bin/terraform terraform version (dns block)
    • Triggering command: /usr/local/bin/terraform terraform init -backend=false (dns block)
    • Triggering command: /usr/local/bin/terraform terraform validate (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

It seems to me we are missing the deployment of an Azure Function app per enviroment to create the link between the Alpinebot chat box and Azure OpenAI. What do you think ?


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 5 commits November 23, 2025 14:55
Co-authored-by: fpittelo <3135901+fpittelo@users.noreply.github.com>
Co-authored-by: fpittelo <3135901+fpittelo@users.noreply.github.com>
Co-authored-by: fpittelo <3135901+fpittelo@users.noreply.github.com>
Co-authored-by: fpittelo <3135901+fpittelo@users.noreply.github.com>
Co-authored-by: fpittelo <3135901+fpittelo@users.noreply.github.com>
Copilot AI changed the title [WIP] Add deployment of Azure Function app for Alpinebot Add Azure Function App deployment infrastructure per environment Nov 23, 2025
Copilot AI requested a review from fpittelo November 23, 2025 15:06
@fpittelo fpittelo marked this pull request as ready for review November 23, 2025 15:08
@fpittelo fpittelo merged commit c826eac into dev Nov 23, 2025
@fpittelo fpittelo deleted the copilot/add-azure-function-deployment branch November 23, 2025 15:09
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.

2 participants