Skip to content

Commit 444a335

Browse files
committed
Convert Azure Defender dict values into resources
This improves how these work on the shell and give LLMs the information they need to write these queries. Signed-off-by: Tim Smith <tsmith84@gmail.com>
1 parent 4f8cccc commit 444a335

File tree

4 files changed

+1512
-292
lines changed

4 files changed

+1512
-292
lines changed

providers/azure/resources/azure.lr

Lines changed: 126 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2590,29 +2590,29 @@ private azure.subscription.cloudDefenderService @defaults("defenderForServers.en
25902590
// Whether the monitoring agent is automatically provisioned on new VMs
25912591
monitoringAgentAutoProvision() bool
25922592
// List of Defender for Servers components and whether they are enabled
2593-
defenderForServers() dict
2593+
defenderForServers() azure.subscription.cloudDefenderService.defenderForServers
25942594
// Microsoft Defender for App Service configuration
2595-
defenderForAppServices() dict
2595+
defenderForAppServices() azure.subscription.cloudDefenderService.defenderForAppServices
25962596
// Microsoft Defender for SQL servers on machines configuration
2597-
defenderForSqlServersOnMachines() dict
2597+
defenderForSqlServersOnMachines() azure.subscription.cloudDefenderService.defenderForSqlServersOnMachines
25982598
// Microsoft Defender for Azure SQL Databases configuration
2599-
defenderForSqlDatabases() dict
2599+
defenderForSqlDatabases() azure.subscription.cloudDefenderService.defenderForSqlDatabases
26002600
// Microsoft Defender for open-source relational databases configuration
2601-
defenderForOpenSourceDatabases() dict
2601+
defenderForOpenSourceDatabases() azure.subscription.cloudDefenderService.defenderForOpenSourceDatabases
26022602
// Microsoft Defender for Azure Cosmos DB configuration
2603-
defenderForCosmosDb() dict
2603+
defenderForCosmosDb() azure.subscription.cloudDefenderService.defenderForCosmosDb
26042604
// Microsoft Defender for Storage Accounts configuration
2605-
defenderForStorageAccounts() dict
2605+
defenderForStorageAccounts() azure.subscription.cloudDefenderService.defenderForStorageAccounts
26062606
// Microsoft Defender for Key Vault configuration
2607-
defenderForKeyVaults() dict
2607+
defenderForKeyVaults() azure.subscription.cloudDefenderService.defenderForKeyVaults
26082608
// Microsoft Defender for Resource Manager configuration
2609-
defenderForResourceManager() dict
2609+
defenderForResourceManager() azure.subscription.cloudDefenderService.defenderForResourceManager
26102610
// Microsoft Defender for APIs configuration
26112611
defenderForApis() azure.subscription.cloudDefenderService.defenderForApis
26122612
// Microsoft Defender Cloud Security Posture Management (CSPM) configuration
26132613
defenderCSPM() azure.subscription.cloudDefenderService.defenderCSPM
26142614
// Defender for Containers components configuration
2615-
defenderForContainers() dict
2615+
defenderForContainers() azure.subscription.cloudDefenderService.defenderForContainers
26162616
// List of configured security contacts
26172617
securityContacts() []azure.subscription.cloudDefenderService.securityContact
26182618
// Settings for MCAS
@@ -2669,6 +2669,122 @@ private azure.subscription.cloudDefenderService.defenderCSPM.extension {
26692669
isEnabled bool
26702670
}
26712671

2672+
// Microsoft Defender for Servers
2673+
private azure.subscription.cloudDefenderService.defenderForServers @defaults("enabled pricingTier") {
2674+
// Subscription identifier
2675+
subscriptionId string
2676+
// Whether Defender for Servers is enabled
2677+
enabled bool
2678+
// Pricing tier for Defender for Servers
2679+
pricingTier string
2680+
// Name of the vulnerability management tool in use
2681+
vulnerabilityManagementToolName string
2682+
}
2683+
2684+
// Microsoft Defender for App Service
2685+
private azure.subscription.cloudDefenderService.defenderForAppServices @defaults("enabled pricingTier") {
2686+
// Subscription identifier
2687+
subscriptionId string
2688+
// Whether Defender for App Service is enabled
2689+
enabled bool
2690+
// Pricing tier for Defender for App Service
2691+
pricingTier string
2692+
}
2693+
2694+
// Microsoft Defender for SQL servers on machines
2695+
private azure.subscription.cloudDefenderService.defenderForSqlServersOnMachines @defaults("enabled pricingTier") {
2696+
// Subscription identifier
2697+
subscriptionId string
2698+
// Whether Defender for SQL servers on machines is enabled
2699+
enabled bool
2700+
// Pricing tier for Defender for SQL servers on machines
2701+
pricingTier string
2702+
}
2703+
2704+
// Microsoft Defender for Azure SQL Databases
2705+
private azure.subscription.cloudDefenderService.defenderForSqlDatabases @defaults("enabled pricingTier") {
2706+
// Subscription identifier
2707+
subscriptionId string
2708+
// Whether Defender for Azure SQL Databases is enabled
2709+
enabled bool
2710+
// Pricing tier for Defender for Azure SQL Databases
2711+
pricingTier string
2712+
}
2713+
2714+
// Microsoft Defender for open-source relational databases
2715+
private azure.subscription.cloudDefenderService.defenderForOpenSourceDatabases @defaults("enabled pricingTier") {
2716+
// Subscription identifier
2717+
subscriptionId string
2718+
// Whether Defender for open-source relational databases is enabled
2719+
enabled bool
2720+
// Pricing tier for Defender for open-source relational databases
2721+
pricingTier string
2722+
}
2723+
2724+
// Microsoft Defender for Azure Cosmos DB
2725+
private azure.subscription.cloudDefenderService.defenderForCosmosDb @defaults("enabled pricingTier") {
2726+
// Subscription identifier
2727+
subscriptionId string
2728+
// Whether Defender for Azure Cosmos DB is enabled
2729+
enabled bool
2730+
// Pricing tier for Defender for Azure Cosmos DB
2731+
pricingTier string
2732+
}
2733+
2734+
// Microsoft Defender for Storage Accounts
2735+
private azure.subscription.cloudDefenderService.defenderForStorageAccounts @defaults("enabled pricingTier") {
2736+
// Subscription identifier
2737+
subscriptionId string
2738+
// Whether Defender for Storage Accounts is enabled
2739+
enabled bool
2740+
// Pricing tier for Defender for Storage Accounts
2741+
pricingTier string
2742+
}
2743+
2744+
// Microsoft Defender for Key Vault
2745+
private azure.subscription.cloudDefenderService.defenderForKeyVaults @defaults("enabled pricingTier") {
2746+
// Subscription identifier
2747+
subscriptionId string
2748+
// Whether Defender for Key Vault is enabled
2749+
enabled bool
2750+
// Pricing tier for Defender for Key Vault
2751+
pricingTier string
2752+
}
2753+
2754+
// Microsoft Defender for Resource Manager
2755+
private azure.subscription.cloudDefenderService.defenderForResourceManager @defaults("enabled pricingTier") {
2756+
// Subscription identifier
2757+
subscriptionId string
2758+
// Whether Defender for Resource Manager is enabled
2759+
enabled bool
2760+
// Pricing tier for Defender for Resource Manager
2761+
pricingTier string
2762+
}
2763+
2764+
// Microsoft Defender for Containers
2765+
private azure.subscription.cloudDefenderService.defenderForContainers @defaults("enabled pricingTier") {
2766+
// Subscription identifier
2767+
subscriptionId string
2768+
// Whether Defender for Containers is enabled
2769+
enabled bool
2770+
// Pricing tier for Defender for Containers
2771+
pricingTier string
2772+
// Whether the Defender DaemonSet is deployed
2773+
defenderDaemonSet bool
2774+
// Whether Azure Policy for Kubernetes is enabled
2775+
azurePolicyForKubernetes bool
2776+
// Extensions configured for Defender for Containers
2777+
extensions []azure.subscription.cloudDefenderService.defenderForContainers.extension
2778+
}
2779+
2780+
// Microsoft Defender for Containers extension
2781+
private azure.subscription.cloudDefenderService.defenderForContainers.extension {
2782+
// Extension name
2783+
name string
2784+
// Whether the extension is enabled
2785+
isEnabled bool
2786+
}
2787+
26722788
// Microsoft Defender for Cloud security contact
26732789
private azure.subscription.cloudDefenderService.securityContact @defaults("id name"){
26742790
// ID of the security contact

0 commit comments

Comments
 (0)