Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion providers/azure/resources/discovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,21 @@ var All = []string{
DiscoveryInstances,
}

var Auto = []string{DiscoverySubscriptions}
var Auto = []string{
DiscoverySubscriptions,
DiscoveryInstances,
//DiscoveryInstancesApi,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@preslavgerchev can you chime in here on the difference between these two and which things we should default to?

Copy link
Copy Markdown
Contributor

@vjeffrey vjeffrey Jan 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instances will discover the os - like something you can connect to - the instancesAPI one is about instance configuration. we don't want both on right now for any cloud discovery, it will create double assets

DiscoverySqlServers,
DiscoveryPostgresServers,
DiscoveryPostgresFlexibleServers,
DiscoveryMySqlServers,
DiscoveryMySqlFlexibleServers,
DiscoveryMariaDbServers,
DiscoveryStorageAccounts,
DiscoveryStorageContainers,
DiscoveryKeyVaults,
DiscoverySecurityGroups,
}

func allDiscovery() []string {
return append(All, AllAPIResources...)
Expand Down
4 changes: 4 additions & 0 deletions providers/azure/resources/discovery_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,8 @@ func TestGetDiscoveryTargets(t *testing.T) {
// test random
config.Discover.Targets = []string{"postgres-servers", "keyvaults-vaults", "instances"}
require.Equal(t, []string{DiscoveryPostgresServers, DiscoveryKeyVaults, DiscoveryInstances}, getDiscoveryTargets(config))

// test standard cli run without options
config.Discover.Targets = []string{}
require.Equal(t, Auto, getDiscoveryTargets(config))
}