What Formal Discovers
Database Autodiscovery
Database Autodiscovery
Discover Azure Database for PostgreSQL and MySQL flexible servers and add
them as Formal resources.
AKS Autodiscovery
AKS Autodiscovery
Discover AKS clusters for Kubernetes access control.
Virtual Machine Autodiscovery
Virtual Machine Autodiscovery
Discover Azure virtual machines for SSH access.
Blob Storage Log Delivery
Blob Storage Log Delivery
Forward Formal Connector logs to Blob Storage containers for long-term
storage and compliance.
Architecture
Theterraform-formal-azure module creates:
- Resource Group: a group named
fml-<suffix>holding Formal’s identity, so the module needs no pre-existing group - User-Assigned Managed Identity: the identity Formal authenticates as
- Federated Identity Credential: pins Formal’s OIDC issuer, Formal’s per-integration role ARN as the subject, and the
api://AzureADTokenExchangeaudience. Entra matches all three exactly, so only that role can exchange a token. - Role Assignments: the built-in roles the enabled capabilities require, on the subscription or on a single resource group when one is set
Reader covers every discovery call, so it is granted once rather than per resource type, and Storage Blob Data Contributor is added for log delivery.
Azure has no region for the integration itself. The managed identity is regional, but what it can read is not, so discovery covers the whole subscription regardless of where the identity lives.
Setup
- Web Console
- Terraform
1
Navigate to Cloud Accounts
Go to Cloud Accounts
2
Create Integration
Click Create Integration and choose Microsoft Azure
3
Enter Details
Enter a name and the subscription ID to connect. Optionally set a resource group to narrow Formal’s access to that group instead of the whole subscription.
4
Choose Discovery
Toggle autodiscovery for Virtual Machines, AKS, and Databases. All are on by default.
5
Configure Blob Storage Access
To deliver logs to Blob Storage, enable Blob Storage log writes. Leave the storage account list empty to allow every account in scope, or name specific accounts to scope access.
6
Run the Setup Command
Formal shows a command with your integration ID and security key filled in. Paste it into an authenticated Azure Cloud Shell for that subscription:It fetches the setup parameters from Formal, runs
terraform apply, then reports the tenant and managed identity client ID back to Formal, which activates the integration.Blob Storage Log Delivery
To forward logs to Blob Storage, the integration needs Blob Storage access. Enable it when creating the integration with two settings:
Formal grants matching roles:
Storage Blob Data Contributor on the subscription or resource group when the account list is empty, or on each named account when you restrict it.
Once access is granted, create a Log Integration pointing at a container to start forwarding logs.
Security
- Federated, keyless: no client secrets or certificates are created or stored.
- Pinned role: the federated identity credential trusts only Formal’s exact per-integration role ARN, matched case sensitively alongside the issuer and audience.
- Least privilege: the managed identity gets only the built-in roles the capabilities you enable require.
- Scope narrowing: set a resource group to keep discovery and every role assignment inside that group.
- Account scoping: restrict
blob_storage_accountsso Formal can write only to the accounts you name.
Troubleshooting
Setup command fails
Setup command fails
Possible causes:
- The Cloud Shell is not set to the target subscription
- The account lacks permission to create resource groups, identities, or role assignments
- The integration ID or security key is wrong
- The command was run in PowerShell rather than Bash
- Run
az account set --subscription <SUBSCRIPTION_ID>in the Cloud Shell - Ensure the account has
Owner, orContributorplusUser Access Administrator - Copy the exact command Formal shows when you create the integration
Resources not discovered
Resources not discovered
Possible causes:
- Autodiscovery disabled for that resource type
- The integration is scoped to a resource group that does not hold the resources
- The database server is neither a PostgreSQL nor a MySQL flexible server
- The managed identity is missing the
Readerrole
- Verify the discovery toggle is enabled on the Cloud Account
- Confirm the resource group on the integration matches where the resources live, or clear it to cover the subscription
- Re-run the setup command so the module grants the roles
- Wait a few minutes for the initial scan
Activation reports an Entra error
Activation reports an Entra error
Possible causes:
- Entra has not finished replicating the new federated identity credential
AADSTS70021 even though setup succeeded.Blob log forwarding not working
Blob log forwarding not working
Possible causes:
- Blob Storage access not enabled on the integration
- The target account is not in the
blob_storage_accountsallowlist - Log integration not configured
- Confirm
allow_blob_accessis enabled on the Cloud Account - Add the account to
blob_storage_accounts, or leave the list empty to allow all accounts in scope - Create a Log Integration pointing to this cloud integration
Next Steps
Log Integration
Forward logs to Blob Storage
Add Resources
Manually configure discovered resources
Terraform
Manage integrations as code
View Resources
See all autodiscovered resources