azure

package
v0.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 8, 2023 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultEnvPrefix = "VMCLARITY_AZURE"
)
View Source
const (
	ProvisioningStateSucceeded = "Succeeded"
)

Variables

View Source
var (
	NetworkInterfaceEstimateProvisionTime = 10 * time.Second
	NetworkInterfaceDeleteEstimateTime    = 10 * time.Second
)
View Source
var (
	VMCreateEstimateProvisionTime = 2 * time.Minute
	VMDiskAttachEstimateTime      = 2 * time.Minute
	VMDeleteEstimateTime          = 2 * time.Minute
)
View Source
var (
	SnapshotCreateEstimateProvisionTime = 2 * time.Minute
	SnapshotDeleteEstimateTime          = 2 * time.Minute
)
View Source
var (
	DiskEstimateProvisionTime = 2 * time.Minute
	DiskDeleteEstimateTime    = 2 * time.Minute
)

Functions

This section is empty.

Types

type AzurePublicKey

type AzurePublicKey string

func (*AzurePublicKey) UnmarshalText

func (a *AzurePublicKey) UnmarshalText(text []byte) error

type Config

type Config struct {
	SubscriptionID              string         `mapstructure:"subscription_id"`
	ScannerLocation             string         `mapstructure:"scanner_location"`
	ScannerResourceGroup        string         `mapstructure:"scanner_resource_group"`
	ScannerSubnet               string         `mapstructure:"scanner_subnet_id"`
	ScannerPublicKey            AzurePublicKey `mapstructure:"scanner_public_key"`
	ScannerVMSize               string         `mapstructure:"scanner_vm_size"`
	ScannerImagePublisher       string         `mapstructure:"scanner_image_publisher"`
	ScannerImageOffer           string         `mapstructure:"scanner_image_offer"`
	ScannerImageSKU             string         `mapstructure:"scanner_image_sku"`
	ScannerImageVersion         string         `mapstructure:"scanner_image_version"`
	ScannerSecurityGroup        string         `mapstructure:"scanner_security_group"`
	ScannerStorageAccountName   string         `mapstructure:"scanner_storage_account_name"`
	ScannerStorageContainerName string         `mapstructure:"scanner_storage_container_name"`
}

func NewConfig

func NewConfig() (*Config, error)

func (Config) Validate

func (c Config) Validate() error

nolint:cyclop

type Provider

type Provider struct {
	// contains filtered or unexported fields
}

func New

func New(_ context.Context) (*Provider, error)

func (*Provider) DiscoverAssets

func (p *Provider) DiscoverAssets(ctx context.Context) provider.AssetDiscoverer

nolint: cyclop

func (*Provider) Estimate

func (p *Provider) Estimate(ctx context.Context, stats models.AssetScanStats, asset *models.Asset, assetScanTemplate *models.AssetScanTemplate) (*models.Estimation, error)

func (*Provider) Kind

func (p *Provider) Kind() models.CloudProvider

func (*Provider) RemoveAssetScan

func (p *Provider) RemoveAssetScan(ctx context.Context, config *provider.ScanJobConfig) error

func (*Provider) RunAssetScan

func (p *Provider) RunAssetScan(ctx context.Context, config *provider.ScanJobConfig) error

nolint:cyclop

type ResourceGroup

type ResourceGroup struct {
	Name string
}

type ScanScope

type ScanScope struct {
	AllResourceGroups bool
	ResourceGroups    []ResourceGroup
	ScanStopped       bool
	// Only assets that have these tags will be selected for scanning within the selected scan scope.
	// Multiple tags will be treated as an AND operator.
	TagSelector []models.Tag
	// Assets that have these tags will be excluded from the scan, even if they match the tag selector.
	// Multiple tags will be treated as an AND operator.
	ExcludeTags []models.Tag
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL