Skip to content

Commit

Permalink
🧹 Improving the webapp resources to Include diagnostic settings
Browse files Browse the repository at this point in the history
Signed-off-by: Hossein Rouhani <h_rouhani@hotmail.com>
  • Loading branch information
HRouhani committed Sep 3, 2024
1 parent f1e22a0 commit 75f8d4f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions providers/azure/resources/azure.lr
Original file line number Diff line number Diff line change
Expand Up @@ -1027,6 +1027,8 @@ private azure.subscription.webService.appsite @defaults("id name location") {
connectionSettings() dict
// App site stack
stack() dict
// Diagnostic settings for the web app site
diagnosticSettings() []azure.subscription.monitorService.diagnosticsetting
}

// Azure AppSite authentication settings
Expand Down
2 changes: 2 additions & 0 deletions providers/azure/resources/azure.lr.manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2829,6 +2829,8 @@ resources:
authenticationSettings: {}
configuration: {}
connectionSettings: {}
diagnosticSettings:
min_mondoo_version: 9.0.0
id: {}
identity: {}
kind: {}
Expand Down
5 changes: 5 additions & 0 deletions providers/azure/resources/web.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,11 @@ func (a *mqlAzureSubscriptionWebServiceAppsiteconfig) id() (string, error) {
return a.Id.Data, nil
}

func (a *mqlAzureSubscriptionWebServiceAppsite) diagnosticSettings() ([]interface{}, error) {
conn := a.MqlRuntime.Connection.(*connection.AzureConnection)
return getDiagnosticSettings(a.Id.Data, a.MqlRuntime, conn)
}

func (a *mqlAzureSubscriptionWebService) apps() ([]interface{}, error) {
conn := a.MqlRuntime.Connection.(*connection.AzureConnection)
ctx := context.Background()
Expand Down

0 comments on commit 75f8d4f

Please sign in to comment.