Skip to content

Commit

Permalink
[Azure] Add websites asset type (#1376)
Browse files Browse the repository at this point in the history
  • Loading branch information
orouz authored Oct 2, 2023
1 parent 53e8ec1 commit d9a08b5
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions resources/fetching/fetcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ const (
AzureStorageAccountType = "azure-storage-account"
AzureClassicStorageAccountType = "azure-classic-storage-account"
AzureActivityLogAlertType = "azure-activity-log-alert"
AzureWebSiteType = "azure-web-site"
)

// Fetcher represents a data fetcher.
Expand Down
1 change: 1 addition & 0 deletions resources/fetching/fetchers/azure/assets_fetcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ var AzureResourceTypes = map[string]string{
inventory.DiskAssetType: fetching.AzureDiskType,
inventory.StorageAccountAssetType: fetching.AzureStorageAccountType,
inventory.VirtualMachineAssetType: fetching.AzureVMType,
inventory.WebsitesAssetType: fetching.AzureWebSiteType,
}

func NewAzureAssetsFetcher(log *logp.Logger, ch chan fetching.ResourceInfo, provider inventory.ServiceAPI) *AzureAssetsFetcher {
Expand Down
1 change: 1 addition & 0 deletions resources/fetching/fetchers/azure/assets_fetcher_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ func (s *AzureAssetsFetcherTestSuite) TestFetcher_Fetch() {
inventory.DiskAssetType,
inventory.StorageAccountAssetType,
inventory.VirtualMachineAssetType,
inventory.WebsitesAssetType,
} {
mockAssets = append(mockAssets,
inventory.AzureAsset{
Expand Down
1 change: 1 addition & 0 deletions resources/providers/azurelib/inventory/asset.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,5 @@ const (
ClassicVirtualMachineAssetType = "microsoft.classiccompute/virtualmachines"
ClassicStorageAccountAssetType = "microsoft.classicstorage/storageaccounts"
ActivityLogAlertAssetType = "microsoft.insights/activitylogalerts"
WebsitesAssetType = "microsoft.web/sites"
)

0 comments on commit d9a08b5

Please sign in to comment.