Deployment

Install on Microsoft Azure

Deploy ScanSuite Teams into your own Azure subscription on Container Apps with Terraform, with installation examples.

View as Markdown

ScanSuite Teams can run in your own Azure subscription instead of on a server. A Terraform configuration in the azure folder of the installation repository builds everything with one command and removes it with another. The application runs on Azure Container Apps with managed services around it, so there is no virtual machine to patch. A first deployment takes 30 to 40 minutes.

Scope: static analysis

Container Apps has no Docker daemon, so the scanners that run as containers of their own — dynamic web scanning (DAST), infrastructure scanning and the AI pentest — do not run here. Code (SAST), dependency (SCA), infrastructure-as-code, secrets and AI code analysis all work. For the other scan types, install on a server: Install ScanSuite Teams.

What gets built

Everything lives in one resource group that the deployment creates. Secrets are generated on the first deploy and kept in Key Vault. The database is reachable only from inside the virtual network, and the artefact storage only from the Container Apps subnet, without storage keys.

PartHow it runs
Web UI and APIA container app with managed TLS; its ingress admits only your address ranges.
Background workersContainer apps: housekeeping and recovery of interrupted scans, the scheduler, Redis for the task queue, and the sandbox for AI proof-of-concept checks, started on demand.
ScansOne Container Apps job execution per scan, 4 vCPU and 8 GiB, gone when the scan ends.
Database migrationA Container Apps job that deploy.sh runs.
DatabaseAzure Database for PostgreSQL 16 (Flexible Server), private; 7 days of backups, 14 and a zone-redundant standby with environment = "prod".
Scan artefactsBlob Storage, reached with a managed identity, earlier versions kept for 30 days.
ImagesYour own Azure Container Registry: the installation never pulls from the internet at run time.
Logs and alertsLog Analytics, capped at 1 GB a day by default. Alerts on errors, failed scans and database load are created only when alert_email is set.

1. Before you start

PrerequisiteCheckExpected
The Azure CLI 2.60 or neweraz version --query '"azure-cli"' -o tsv2.60.0 or later
Terraform 1.6 or newerterraform versionTerraform v1.6.0 or later
git and bash (Linux, macOS, or Windows with WSL or Git Bash)git --version; bash --version | head -1a version line each
Owner on the subscription, or Contributor together with Role Based Access Control Administrator (the deployment creates managed identities, a custom role and role assignments), after step 3az role assignment list --assignee <YOUR_ACCOUNT> --scope /subscriptions/<SUBSCRIPTION_ID> --include-inherited --query "[].roleDefinitionName" -o tsvOwner, or both Contributor and Role Based Access Control Administrator
The licence file and the registry user name and access token, from your order—See step 2
Your public IPv4 address, or the ranges allowed to open the web UIcurl -4 -s https://ifconfig.mean IPv4 address; ask for IPv4 explicitly, many connections report IPv6 otherwise
Let an agent prepare the deployment
Using https://scansuite.eu/documentation/installation/install-on-azure, check my prerequisites, write terraform.tfvars for a <trial|production> installation in subscription <SUBSCRIPTION_ID> with my IPv4 address in web_allowed_cidrs, run terraform init and terraform plan, and show me both. Do not run ./deploy.sh or ./destroy.sh until I say so. I will run az login and export DOCKERHUB_USERNAME and DOCKERHUB_TOKEN myself; never ask me for the token.

Paste it into Claude Code or another coding agent. See Working with AI agents.

The values this page uses:

PlaceholderWhere it comes from
<SUBSCRIPTION_ID>The subscription to deploy into: az account list -o table, column SubscriptionId.
<YOUR_ACCOUNT>Your Azure sign-in name: az account show --query user.name -o tsv.
<LICENCE_CODE>The six characters after the last underscore of the licence file name, <name>_<LICENCE_CODE>.lic. It is also the image tag.
<REGISTRY_USER>The registry user name sent with your order.
<YOUR_IPV4>The output of curl -4 -s https://ifconfig.me, or your office and VPN ranges.
<RESOURCE_GROUP>The resource_group_name you set in terraform.tfvars.
<RESOURCE>For Azure OpenAI: the name of your Azure OpenAI resource.

2. Get the installation files

bash
git clone https://github.com/cepxeo/scansuite.git
cp /path/to/<name>_<LICENCE_CODE>.lic scansuite/key/
cd scansuite/azure
ls ../key/*.lic

Expected: exactly one .lic file listed. With several, set pyarmor_license_file.

3. Sign in to Azure

Sign in in the browser that opens, and pick the subscription:

bash
az login
az account set --subscription <SUBSCRIPTION_ID>

Check:

Shell
az account show --query "{subscription:id, user:user.name}" -o tsv

Expected: the subscription ID and your sign-in name. Then run the role check from step 1.

4. Write the settings

Copy the example settings and edit the copy. Section 7 has complete examples; the settings reference lists every setting.

Shell
cp terraform.tfvars.example terraform.tfvars
SettingWhat to putDefault
subscription_idThe subscription ID.required
locationThe region, such as germanywestcentral, swedencentral or northeurope.germanywestcentral
resource_group_nameA new resource group name. The deployment creates it, so it must not exist yet.rg-scansuite-dev
environmentdev or prod (see the settings reference).dev
image_tagYour licence code.required
web_allowed_cidrsThe address ranges allowed to open the UI, such as ["203.0.113.10/32"]. Set it before the first deploy: the setup page belongs to whoever opens it first.open to the internet
timezoneThe time zone scheduled scans run in.Europe/Berlin
alert_emailWhere alerts go. Without it no alerts are created.none

Optional preview, which changes nothing:

Shell
terraform init && terraform plan

Expected: Plan: N to add, 0 to change, 0 to destroy.

5. Deploy

./deploy.sh creates and changes resources without a further question: running it is the approval. Give the registry credentials to the shell yourself — they are used only to copy the images into your registry and never saved:

bash
export DOCKERHUB_USERNAME='<REGISTRY_USER>'
read -rsp 'Registry access token: ' DOCKERHUB_TOKEN; echo; export DOCKERHUB_TOKEN
./deploy.sh

The script checks your tools, sign-in and licence, and whether the region lets your subscription create PostgreSQL, before creating anything; builds the network, database, Key Vault, storage, registry, the Container Apps environment and Redis (most of the time); copies the ScanSuite images into your registry; starts the web UI and workers and runs the database migration. Re-running it is safe at any point.

If Docker on the same machine already holds the images for your licence code, for example from a server installation, deploy.sh pushes those local copies instead of copying from the registry; remove them first if they may be out of date.

Expected: the run ends with ==> Done, the outputs, and a Next list. Check that the setup page answers:

bash
terraform output url
curl -sk -o /dev/null -w '%{http_code}\n' "$(terraform output -raw url)/setup"

Expected: the address, then 200.

6. Sign in and connect AI

Open the url output right away and create the first account on the setup page, choosing the password yourself — as on a server, see Create the first account in Install ScanSuite Teams. Whoever opens the page first gets that account.

Fields and checks are the same as on a server: Install ScanSuite Teams, step 5. Then connect the AI provider — with no scanner containers the model does the analysis, so this is not optional. In the user menu (top right) open System Settings → Shared services:

  1. AI connections → Add connection. For Azure OpenAI: Kind OpenAI-compatible, API URLhttps://<RESOURCE>.openai.azure.com/openai/v1, API key the resource's key. Any other supported provider works too. Click Save.
  2. AI models → Add model: Name, Connection, and as Model ID the Azure OpenAI deployment name. Click Save.
  3. Task routing → Change on the Default row → First model → Save.
  4. System AI → Test connection. Expected: Answered in N s: …

Type the Azure OpenAI key into the API key field yourself, never into a chat.

If your AI endpoint allows only listed addresses, add a fixed outbound address (example C). Every field and the per-task routing are in AI providers and cost. Then continue with Quick start.

7. Installation examples

Examples A and B are complete terraform.tfvars files; C to E are lines to add to one of them. The registry credentials always come from the shell, as in step 5.

A. A trial installation

The small dev sizes, the UI open to one address:

terraform.tfvars
subscription_id     = "00000000-0000-0000-0000-000000000000"
location            = "swedencentral"
resource_group_name = "rg-scansuite-trial"
environment         = "dev"

image_tag         = "a1b2c3"
web_allowed_cidrs = ["203.0.113.10/32"]
timezone          = "Europe/Berlin"

# Cold start instead of an always-warm UI: the first visit after a quiet
# period waits about a minute.
web_min_replicas = 0

When the trial is over, ./destroy.sh removes the whole resource group.

B. A production installation

A zone-redundant database with a standby, zone-redundant storage, a Premium registry, Key Vault purge protection and a dedicated compute profile for the scans, plus a fixed outbound address and unlimited logs:

terraform.tfvars
subscription_id     = "00000000-0000-0000-0000-000000000000"
location            = "germanywestcentral"
resource_group_name = "rg-scansuite"
environment         = "prod"

image_tag         = "a1b2c3"
web_allowed_cidrs = ["198.51.100.0/24", "203.0.113.10/32"]   # office and VPN
timezone          = "Europe/Berlin"
alert_email       = "secops@acme.example"

postgres_sku       = "GP_Standard_D2ds_v5"
enable_nat_gateway = true
log_daily_quota_gb = -1

Expect several hundred USD a month more than dev. Before anyone else runs the deployment, move the Terraform state to Azure Storage, as backend.tf.example describes.

C. A fixed outbound address

Outbound traffic otherwise leaves from the environment's address, which can change. Where your git server or AI endpoint allows only listed addresses, add a NAT gateway (about 35 USD a month plus traffic); the egress_ip output is then the address to allow:

terraform.tfvars
enable_nat_gateway = true

D. A second installation in the same subscription

Such as a test installation next to production. Deploy it from its own copy of the folder, so it has its own Terraform state (cp -r scansuite/azure scansuite/azure-test), into its own resource group. Globally unique names get a random suffix, so nothing else has to change:

terraform.tfvars
resource_group_name = "rg-scansuite-test"

E. A region where PostgreSQL is not offered to you

Some subscription types, Visual Studio ones among them, cannot create PostgreSQL in every region; deploy.sh stops before building anything and says so. Pick another region:

terraform.tfvars
location = "swedencentral"   # or northeurope, francecentral

8. Settings reference

Every setting of terraform.tfvars. Change one by editing the file and running ./deploy.sh again.

Placement

SettingWhat it doesDefaultWhen to change
subscription_idThe subscription to deploy into.required—
locationThe region.germanywestcentralYour region; another one if PostgreSQL is not offered (example E).
resource_group_nameThe resource group the deployment creates for everything.rg-scansuite-devAlways: a name of your own.
name_prefixPrefix of every resource name: 3 to 12 lower-case letters and digits, starting with a letter.scansuiteRarely; globally unique names get a random suffix anyway.
environmentdev, or prod: zone-redundant PostgreSQL with a standby and 14 days of backups, a Premium registry, zone-redundant storage, Key Vault purge protection and a dedicated compute profile for scans.devprod for production.
tagsTags added to every resource, such as { owner = "secops" }.noneYour tagging policy.
timezoneThe time zone of the containers; scheduled scans follow it.Europe/BerlinYour time zone.
alert_emailWhere alerts go. Empty creates no alerts at all.noneProduction.

Network and access

SettingWhat it doesDefaultWhen to change
web_allowed_cidrsRanges allowed through the UI's ingress.empty: the whole internetAlways, before the first deploy.
enable_nat_gatewayA fixed outbound address, the egress_ip output (about 35 USD a month plus traffic).falseYour git server or AI endpoint allows only listed addresses.
vnet_cidrThe virtual network.10.40.0.0/16It overlaps a network you will peer with.
aca_subnet_cidrThe Container Apps subnet; a /23 leaves room to grow.10.40.0.0/23With vnet_cidr.
postgres_subnet_cidrThe database subnet.10.40.2.0/28With vnet_cidr.

Images and licence

SettingWhat it doesDefaultWhen to change
image_tagYour licence code: the tag of the three images.requiredEach new release.
image_registryWhere deploy.sh copies the images from.docker.io/appsec4uDo not change.
image_digestsWritten by deploy.sh to images.auto.tfvars.json.—Never by hand.
key_dirThe folder holding the licence file.../keyThe licence is elsewhere.
pyarmor_license_fileThe licence file name inside key_dir.the only .lic therekey_dir holds several.
deploy_workloadsfalse builds only the platform (network, data, identity, registry, environment), which needs no licence or images.truePrepare the platform before the licence arrives.
worker_poc_installation_secretsGive the proof-of-concept sandbox the installation's keys.falseOnly if support asks, for images older than this release.

Sizing and data

SettingWhat it doesDefaultWhen to change
scan_cpuvCPU per scan, at most 4.4Rarely.
scan_memoryMemory per scan; Container Apps allows 2 GiB per vCPU.8GiWith scan_cpu.
scan_timeout_secondsThe longest a scan may run.172800 (48 hours)Rarely.
web_min_replicasWarm web replicas.10 saves money; the first visit after a quiet period waits about a minute.
web_max_replicasThe most web replicas.2Many concurrent users.
postgres_skuThe database size. B_Standard_B1ms allows about 50 connections; B_Standard_B2s about 430.B_Standard_B1msB_Standard_B2s or GP_Standard_D2ds_v5 for production.
postgres_storage_mbThe database storage in MB.32768Many scans kept for long.
artifact_retention_daysDays earlier versions of stored artefacts are kept.30Your retention policy.
log_daily_quota_gbLog Analytics daily cap in GB; -1 removes it.1-1 for production.
enable_static_scansStatic analyses.TrueLeave it.
enable_dynamic_scansDynamic and infrastructure scans, which need a Docker daemon this deployment does not have.FalseLeave it.

Environment variables and script options

Variable or optionUsed byWhat it does
DOCKERHUB_USERNAME, DOCKERHUB_TOKENdeploy.shThe registry credentials used to copy the images. Typed by a person, never stored.
TF_VAR_subscription_iddeploy.shThe subscription, instead of subscription_id in terraform.tfvars.
MIGRATE=1deploy.shRun the database migration even when the images have not changed. It cancels running scans.
extra argumentsdeploy.sh, destroy.shPassed on to terraform apply or destroy.
-ydestroy.shDo not ask for the resource group name. Give it first: ./destroy.sh -y.

Outputs

OutputWhat it is
urlWhere ScanSuite is served.
resource_groupThe resource group holding everything.
egress_ipThe fixed outbound address, with enable_nat_gateway.
environment_static_ipThe inbound address of the Container Apps environment.
registryThe container registry the images are copied into.
key_vaultThe Key Vault holding the generated secrets.
postgres_fqdnThe database server name, reachable inside the network only.
log_analytics_workspace_idThe Log Analytics workspace, for az monitor log-analytics query.
migrate_job_name, sast_job_nameThe migration job and the scan job.

9. Day-to-day operation

  • Change a setting: edit terraform.tfvars and run ./deploy.sh again. While the images stay the same, running scans carry on.
  • A new release: put the new .lic in ../key/ and remove the old one, set image_tag to the new code, run git pull, then ./deploy.sh. The migration cancels scans still running, so update when none is.
  • Interrupted scans recover by themselves: a scan whose container Azure stopped shows no progress for 90 minutes and is then started again.
  • Logs: open the Log Analytics workspace in the resource group, choose Logs, and query ContainerAppConsoleLogs_CL by ContainerAppName_s (such as scansuite-web) or ContainerJobName_s (scansuite-sast for scans).
  • Save money when nobody uses it: web_min_replicas = 0, and stop the database with az postgres flexible-server stop; Azure starts it again after seven days.
  • Keep the Terraform state safe: terraform.tfstate holds the generated passwords and your licence. Keep it private, back it up after every deploy, and move it to Azure Storage before a second person or a pipeline deploys.

Rough monthly costs in USD for the default dev settings; check your region in the Azure pricing calculator:

ItemApproximate cost
Always-on containers (web, workers, scheduler, Redis)120-160
PostgreSQL B_Standard_B1ms with 32 GB20
Log Analytics, capped at 1 GB a day0-70
Registry, Key Vault, storageabout 10
Scans, 4 vCPU and 8 GiB eachabout 0.45 per scan-hour
NAT gateway, only if enabled35 plus traffic

10. Tear down

Tearing down deletes the database with all scan data. A person decides to run destroy.sh and types the resource group name when it asks.

Shell
./destroy.sh

It deletes everything the deployment created in about 15 minutes. Check:

Shell
az group show -n <RESOURCE_GROUP>

Expected: Resource group '<RESOURCE_GROUP>' could not be found. If the script stops with polling support for the Content-Type "" was not implemented, Azure has already deleted what the message names: run it again, two or three times if need be. With environment = "prod" the Key Vault stays recoverable for its retention period.

Common messages

PostgreSQL Flexible Server 16 is not available to this subscription: example E. ManagedEnvironmentCapacityHeavyUsageError: the region has no room for a new environment right now; delete the failed one (az containerapp env delete) and try again later, or in another region. no licence for image tag: put the .lic in ../key/ and match image_tag to its code. could not import docker.io/appsec4u/...: export the registry credentials in the same shell. Provider produced inconsistent result after apply, after re-creating a deployment with the same resource group name: use a new name, or wait 15 minutes. The URL opens the sign-in page, not the setup page: someone else created the first account — run ./destroy.sh and deploy again with a tighter web_allowed_cidrs. The migration fails: the message names the execution; its log is in Log Analytics, ContainerAppConsoleLogs_CL where ContainerGroupName_s starts with that name (allow a few minutes). Fix the cause and run ./deploy.sh again.

Last reviewed 2026-10-19