Skip to main content

Azure

The Azure scrapers scrapes your azure account to fetch all the resources & save them as configs.

azure-scraper.yaml
apiVersion: configs.flanksource.com/v1
kind: ScrapeConfig
metadata:
name: azure-scraper
spec:
azure:
- connection: connection://azure/flanksource
subscriptionID: e3911016-5810-415f-b075-682db169988f
transform:
relationship:
# Link AKS Cluster to Kubernetes Cluster
- filter: config_class == 'KubernetesCluster'
expr: |
[{
"type": "Kubernetes::Cluster",
"labels": {
"aks-nodeResourceGroup": config["properties"]["nodeResourceGroup"],
"subscriptionID": tags["subscriptionID"]
}
}].toJSON()
# Link Azure Virtual Machine Scale Sets to the Kubernetes Nodes
- filter: config_class == 'Node'
expr: |
[{
"type": "Kubernetes::Node",
"labels": {
"azure/vm-scale-set": name,
"subscriptionID": tags["subscriptionID"]
}
}].toJSON()

Scraper​

FieldDescriptionSchemeRequired
logLevelSpecify the level of logging.string
scheduleSpecify the interval to scrape in cron format. Defaults to every 60 minutes.string
retentionSettings for retaining changes, analysis and scraped itemsRetention
azureAzure scrape config[]Azure

Azure​

FieldDescriptionSchemeRequired
connectionSpecify the connection that provides the clientID, clientSecret & tenantIDstring
subscriptionIDAzure subscription IDstring
tenantIDAzure tenant IDstring
clientIDMicrosoft Entra ID app client idEnvVar
clientSecretMicrosoft Entra ID app client secretEnvVar
includeAzure resources to include for scraping[]string
exclusionsSpecifies the Azure resources to excludeExclusion
entraMicrosoft Entra ID (Azure AD) scraping configurationEntra
propertiesCustom templatable properties for the scraped config items.[]ConfigProperty
transformField to transform resultTransform
tagsSet custom tags on the scraped config itemsmap[string]string
note

Either the connection name or the credentials (clientID, clientSecret & tenantID) are required

Exclusion​

FieldDescriptionSchemeRequired
activityLogsA list of operations to exclude from activity logs[]string

Entra​

FieldDescriptionSchemeRequired
usersSelectors for scraping Entra ID users[]ResourceSelector
groupsSelectors for scraping Entra ID groups[]ResourceSelector
appRegistrationsSelectors for scraping app registrations[]ResourceSelector
enterpriseAppsSelectors for scraping enterprise applications[]ResourceSelector
appRoleAssignmentsSelectors for scraping app role assignments[]ResourceSelector

Resource Types​

The following Azure resources are scraped and mapped to Mission Control config types:

| Resource Type | Config Class | | ------------------------------------------ | --------------------- | --- | | microsoft.compute/virtualmachines | VirtualMachine | | microsoft.compute/virtualmachinescalesets | Node | | microsoft.network/loadbalancers | LoadBalancer | | microsoft.network/virtualnetworks | VirtualNetwork | | microsoft.containerregistry/registries | ContainerRegistry | | microsoft.network/azurefirewalls | Firewall | | microsoft.sql/servers | RelationalDatabase | | microsoft.dbforpostgresql/servers | RelationalDatabase | | microsoft.containerservice/managedclusters | KubernetesCluster | | microsoft.resources/resourcegroups | ResourceGroup | | subscription | Subscription | | microsoft.storage/storageaccounts | StorageAccount | | microsoft.web/sites | AppService | | microsoft.network/dnszones | DNSZone | | microsoft.network/privatednszones | PrivateDNSZone | | microsoft.network/trafficmanagerprofiles | TrafficManagerProfile | | microsoft.network/networksecuritygroups | SecurityGroup | | microsoft.network/publicipaddresses | PublicIPAddress | + |