Use Devin to create a new branch for your repository. Provide the repo name and a suitable branch name.
Switch to your new branch in Azure Repos and press Clone.
In the Clone Repository dialog, select Clone in VS Code.
When prompted, select your destination folder (e.g. your RioEvo folder).
Once cloned, confirm VS Code is on the correct repo and branch. Check the breadcrumb at the top of the explorer.
Download New-TerraformService.ps1 from the TerraformScript Repos location and place it into the root of your cloned repository folder.
Open a terminal in VS Code and run the PowerShell script:
Run this command first, then try again:
The script will prompt for a ServiceName. Enter your service name (e.g. allergies).
The script will scaffold the Terraform files and confirm completion:
Check the generated files carefully. Pay particular attention to the tfbackend files — the script sometimes adds an extra 's' to the service name which is incorrect.
are-allergiess-dev-ukw.tfstate — remove the extra 's'frontend/azure/build-and-deploy.yml — comment out the Deploy Test section:
terraform/azure/deploy-terraform.yml — comment out the Test Plan and Test Apply sections:
Commit all staged changes to your branch. Do not commit the PowerShell script (New-TerraformService.ps1) — leave it out of the commit.
After committing, sync the branch by pressing the sync button at the bottom of VS Code.
Navigate to the Terraform > Rio Evo folder in Pipelines. Create a new folder for your product (e.g. Allergies).
Follow the pipeline creation wizard:
Step 1 — Connect: Select Azure Repos Git
Step 2 — Select: Search for and select your repository
Step 3 — Configure: Select Existing Azure Pipelines YAML file
Step 4 — Select branch and path: Choose your working branch, then select the YAML file path
Press the dropdown arrow next to Run and select Save (do not run yet).
Before running the pipeline, confirm the resource group doesn't already exist. Go to Azure Resource Manager and filter by your service name and the HSC - RioReimagined - Dev subscription.
Run the pipeline for the first time with Plan Only (skip Apply) ticked to verify what will be created without making any changes.
Select your branch in the pipeline version selector:
Ensure Plan Only (skip Apply) is ticked, then press Run:
On the first run you will need to grant permissions. Click View when the permission warning appears:
Permit all listed resources:
Wait for the pipeline to complete. Check the Terraform Plan step to review what resources will be created:
Review the Terraform Plan output to confirm the correct resource group name:
Run the pipeline again, this time with Plan Only (skip Apply) unticked to actually create the resources.
The Dev - Apply stage will require another permission grant. Watch for the warning and click View:
Return to Azure Resource Manager and filter again to confirm the resource group and all resources have been created.
Open the resource group to confirm all expected resources are present:
Navigate to Deployments > Rio Evo. Create a new folder for your product.
Follow the same pipeline creation wizard as Step 7 (Azure Repos Git → select repo → Existing YAML file → select branch). For the YAML path, select:
Press the dropdown arrow next to Run and select Save.
After saving, click Edit on the pipeline:
Click the three-dot menu (⋯) and select Triggers:
Under Continuous integration, tick Override the YAML continuous integration trigger and select Disable continuous integration:
Rename the pipeline by clicking the pencil icon next to the pipeline name. Add SWA Deploy to the name:
The Allergies folder already exists from the previous step. Right-click it and select New pipeline:
Follow the same wizard (Azure Repos Git → select repo → Existing YAML file → select branch). For the YAML path, you need /backend/{name}-service/azure/deploy-pipelines.yml. This likely won't appear in the dropdown list and must be entered manually.
In VS Code, check if the file exists under backend/allergies-service/azure/:
If the files don't exist, copy them from another product and edit any references for your service. The azure folder should contain:
Commit and sync the pipeline files to your branch:
Back in Azure DevOps, right-click deploy-pipelines.yml in VS Code and select Copy Relative Path:
Paste the path into the YAML file selector in Azure DevOps:
backend/allergies-service/azure/deploy-pipelines.ymlPress the dropdown arrow next to Run and select Save. The pipeline breadcrumb should show:
Follow the same process as Step 13: Edit → Triggers → Override YAML CI trigger → Disable continuous integration → Rename → Save.
After saving both the SWA Deploy and API Deploy pipelines, you should see both listed under the Allergies folder:
Navigate to Builds > Rio Evo. Create a new folder for your product.
Follow the same wizard. For the YAML path, you need /backend/{name}-service/azure/build-pipelines.yml. Right-click the file in VS Code and select Copy Relative Path:
Paste the path into the YAML file selector:
backend/allergies-service/azure/build-pipelines.ymlPress Save. The pipeline breadcrumb should show:
Follow the same process: Edit → Triggers → Override YAML CI trigger → Disable continuous integration → Rename to Services.Allergies Build.
/backend/{name}-service/azure/deploy-pipelines.yml. Check that file for the correct value.
Next, go to the Variables tab and add a pipeline variable:
Add the following variable:
| Name | Value |
|---|---|
| AzureSubscription | HSC RIOREIMG DEV |
Then save using Save & queue → Save:
Run the Build pipeline from your branch. Leave the runtests and runMigrations parameters unchecked for the initial run.
As with previous pipelines, watch for permission warnings and grant access when prompted:
Once the Build stage completes, the Deploy to Dev stage will appear and may also require permission:
Run the SWA Deploy pipeline from your branch. As with previous pipelines, watch for approval/permit warnings. While only DEV is enabled, it should not prompt to select an environment.
"App Directory Location: 'frontend' is invalid. Could not detect this directory."
Solution — edit
frontend/azure/build-and-deploy.yml:Line 44: Change
customCommand: 'run build' → customCommand: 'run build:remote'Line 49: Change
targetPath: frontend/dist → targetPath: frontend/buildLines 85–92: Replace the AzureStaticWebApp@0 task inputs:
Before running the API pipeline, use Devin to set the correct target port on both the Docker configuration and the Container App ingress settings. This prevents the container from failing to start due to port mismatches.
Run the API Deploy pipeline from your branch. Leave the artifact as the default on the first run. Watch for permission warnings as with previous pipelines.
At this stage the setup should be complete. Here is a summary of everything that has been done:
| Task | Status |
|---|---|
| Created a new branch via Devin | ✓ Done |
| Cloned the repository to VS Code | ✓ Done |
| Generated Terraform scripts via PowerShell scaffold | ✓ Done |
| Committed and synced all generated files | ✓ Done |
| Created and ran the Terraform pipeline (Plan + Apply) | ✓ Done |
| Verified Azure resources created successfully | ✓ Done |
| Created the SWA Deploy pipeline (Deployments) | ✓ Done |
| Created the API Deploy pipeline (Deployments) | ✓ Done |
| Created the Build pipeline (Builds) | ✓ Done |
| Ran all 4 pipelines as initial runs | ✓ Done |