-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Context:
The web API is a FastAPI application that serves MTCars data, with endpoints for health checks
and data retrieval. It uses API key authentication and is containerized with Docker. The image
is currently built and pushed to GHCR via GitHub Actions.
Locally, I was able to manually deploy the WebAPI using the Azure GUI. We need an
automated, reproducible deployment process using Terraform to provision all necessary
Azure resources and deploy our containerized API.
This will make our deployment process more reliable, version-controlled, and easier
to maintain.
Acceptance Criteria
-
Create Terraform configuration files to provision the following Azure resources:
- Container App Environment
- Container App to run the web API
- Managed Identity for secure credential management
- Key Vault for storing API keys and other secrets (you can use a dummy example for this, we are serving
mtcarspublic dummy data here so no risk of problems) - Note: an RG already exists for this project "RMI-SP-CF-PBTA-RG"
- Note: the storage account pbtartfstate can be used to store terraform state (please don't use the
pathwaydatarawstorage account) - Note: The image for this application is already automatically built and pushed to GHCR
-
Terraform configuration should include:
- Appropriate variables with descriptions and default values where applicable
- Outputs for important resource information (URLs, IDs)
- Resource tagging strategy
- Backend configuration for storing Terraform state
-
Configuration should support:
- Using our existing Docker image from GHCR
- Setting appropriate environment variables (including API_KEY)
- Configuring networking and ingress settings
- Setting up proper scaling rules
-
Documentation:
- README with instructions for using the Terraform configuration
- Required environment variables or authentication prerequisites
- Deployment workflow documentation
-
Testing:
- Successfully deploy the API using the Terraform configuration
- Verify API endpoints function correctly
- Verify API key authentication works as expected
- Document that deployment works end-to-end
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request