一键导入
azure-nhs-deploy
Use when deploying an NHS Python/FastAPI service to Azure using Terraform, or configuring App Service, Key Vault, or Application Insights.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when deploying an NHS Python/FastAPI service to Azure using Terraform, or configuring App Service, Key Vault, or Application Insights.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | azure-nhs-deploy |
| description | Use when deploying an NHS Python/FastAPI service to Azure using Terraform, or configuring App Service, Key Vault, or Application Insights. |
This skill provides step-by-step guidance for deploying an NHS Python/FastAPI + React service to Azure using Terraform. All infrastructure uses Azure UK South for data sovereignty compliance.
terraform applyAll resource names use var.app_name so multiple Alphas can coexist in one subscription:
Resource Group (rg-{app_name}-{env})
├── App Service Plan (asp-{app_name}-{env}, Linux, B1)
├── Linux Web App (app-{app_name}-{env}, Python 3.12)
├── User Assigned Managed Identity
├── Key Vault (kv-{app_name}-{env})
│ └── Access Policy → Managed Identity (get, list secrets)
└── Application Insights (ai-{app_name}-{env})
Create infra/ with main.tf, variables.tf, outputs.tf. Define:
variable "app_name" — required, the service namevariable "environment" — default "dev"azurerm resources using "${var.app_name}-${var.environment}" namingcd infra
terraform init
terraform plan -var="app_name=my-service" -out=tfplan
Always read the tfplan output before running apply. Resources being
destroyed or recreated without warning have delayed deployments — never apply a
plan you have not inspected.
Generate a machine- and human-readable view of the plan:
terraform show tfplan # full human-readable review of what will change
terraform show -no-color tfplan # capture this output to summarise for the user
The agent must summarise this plan back to the user and wait for explicit
confirmation before running apply. Present the summary as:
Plan: 1 to add, 0 to change, 0 to destroy.+ create — a new resource~ update in place — safe change- destroy — the resource will be deleted-/+ destroy and then create replacement — the resource will be recreated
(existing data, such as Key Vault contents, may be lost)- (destroy) or -/+ (recreate) resources.If anything is unexpectedly marked - or -/+, stop and investigate before
applying. Only proceed to apply once the user has confirmed the summary.
terraform apply tfplan
cd ../frontend && npm run build && cd ..
zip -r app.zip app/ frontend/dist/ requirements.txt
az webapp deploy \
--resource-group "rg-${APP_NAME}-dev" \
--name "app-${APP_NAME}-dev" \
--src-path app.zip \
--type zip
az webapp config set \
--resource-group "rg-${APP_NAME}-dev" \
--name "app-${APP_NAME}-dev" \
--startup-file "uvicorn app.main:app --host 0.0.0.0 --port 8000"
curl "https://app-${APP_NAME}-dev.azurewebsites.net/api/health"
| Resource | Terraform Type |
|---|---|
| Resource Group | azurerm_resource_group |
| App Service Plan | azurerm_service_plan |
| Web App | azurerm_linux_web_app |
| Key Vault | azurerm_key_vault |
| Key Vault Access Policy | azurerm_key_vault_access_policy |
| Managed Identity | azurerm_user_assigned_identity |
| Application Insights | azurerm_application_insights |
uksouth — other regions might be allowd for development but production must be UK Southproject = var.app_name, environment = var.environmentvar.app_name — multiple Alphas may share a subscriptiontfplan before apply, summarise it for the user,
and wait for confirmation — never apply a plan with unexpected - (destroy) or
-/+ (recreate) changesUse when generating a clinical safety hazard log, clinical risk matrix, or DCB0129 Clinical Safety Case Report for an NHS digital health service.
Use when scaffolding or building an NHS service with the FastAPI + React + Azure stack. Contains project structure, scaffold steps, and deployment commands.
Use when assessing a feature or PR against the GDS Service Standard 14 points, or producing NHS Alpha service assessment evidence.
Use when documenting architectural decisions for an NHS digital service using the ADR format, or when reviewing technology choices for GDS assessment evidence.
Use when drafting a Data Protection Impact Assessment (DPIA) for an NHS service that processes health data under UK GDPR.
Use when generating synthetic NHS test data including NHS numbers, patient names, SNOMED codes, and seed scripts for development and demos.