mirror of
https://github.com/gravitational/teleport.git
synced 2026-11-02 23:31:08 +08:00
* Add Azure auto-discovery configuration fields * Init databases if azure matchers are in config * Use AzureMatchers in db service * Use all azure subscriptions/resource groups if omitted in matcher * Add azure config tests * Go mod tidy to update dependencies * Add azure response error conversion * Check for azure access denied and give a helpful error message * Add azure subscriptions api * Add azure mysql/postgresql api and wrappers * Test generic db server for azure * Make server properties its own type * Convert server types manually instead of via json * Move server list method selection logic out of api client * Update azure db server tests * Fixup merge * Update comments * Update more comments and remove junk code * Move all azure api into lib/cloud/azure * Update state and version checks * Convert Azure DB Server into database * Add mutex to subscription client for caching, just in case * Test database conversion from azure db server * Refactor common code * Add azure matchers to watch config * Remove unused imports * Use common max pages in memorydb users * Add azure clients to cloud clients * Add azure fetchers to watcher * Skip fetcher NotFound errors * Add azure watcher tests * Fix test comment * Add wildcard region matching * Remove redundant import * Update lib/srv/db/cloud/watchers/azure.go Co-authored-by: Marek Smoliński <marek@goteleport.com> * Move db server listing logic into separate func * Refactor some db conversion code * Use local var to cache sub IDs * Rename azure subscription client * Rename azure subscription client and remove sub ID caching * Move azure cloud clients into separate embedded interface * Update watcher test for 'NotFound' handling * Embed azureClients struct * Update lib/cloud/azure/db_server_test.go Co-authored-by: Marek Smoliński <marek@goteleport.com> * Update lib/cloud/azure/subscriptions_test.go Co-authored-by: Marek Smoliński <marek@goteleport.com> * Update lib/cloud/azure/db_server_test.go Co-authored-by: Marek Smoliński <marek@goteleport.com> * Update lib/cloud/azure/db_server_test.go Co-authored-by: Marek Smoliński <marek@goteleport.com> * Update lib/cloud/azure/db_server_test.go Co-authored-by: Marek Smoliński <marek@goteleport.com> * Rename azure subscription client and remove sub ID caching * Add reference links for azure db ports * Move indirect dep into group * Wrap all converted azure response errors * Remove unreachable panic * Godoc DBServer * Remove maxPages arg to azure client funcs * Gofmt * Spacing between copyright and package * import order * Update lib/srv/db/cloud/watchers/azure.go Co-authored-by: Marek Smoliński <marek@goteleport.com> * Fix import order * Refactor region matching * Fix usage of azure clients to remove max pages arg * Query azure subscriptions in fetcher.Get if matching wildcard subscription * Fix azure matcher construction * Test azure fetcher discovers new subscriptions * Remove unused test helper func * Set azure database resource id metadata * Log errors when fetching from azure subscription fails * Use more readable protocol in azure db description * Get azure mysql engine version from labels * Update lib/srv/db/cloud/watchers/watcher_test.go Co-authored-by: Marek Smoliński <marek@goteleport.com> * Update lib/srv/db/cloud/watchers/watcher_test.go Co-authored-by: Marek Smoliński <marek@goteleport.com> Co-authored-by: Marek Smoliński <marek@goteleport.com>