* Move GCP cloud clients into a separate interface
* Add azure mysql/postgresql flex server support
* Add teleport db configure create support for azure postgres/mysql flex servers
* discover both single and flexi server with 'mysql' and 'postgres' db types.
* go doc gcp interface
* Add is_flexi_server to database Azure config
* Add a new db engine
* Add tests for new engine
* Update tsh db subcommands
* Refactor error message and suggestions for unsupported tsh commands
* Add dynamodb to test plan
* Add AWS external ID to db config and update protos
When the AWS Account ID is provided, we must check that it is a valid
one.
AWS Account ID is a well documented field: 12-digit string
This check is meant to prevent typos when creating Databases mainly from
the Web UI in the context of Teleport Discover.
* 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>
* Allow to override db name using AWS tag `teleport.dev/database-name`.
* If a single AWS DB maps to several Teleport DB entries, the override will become part of the name.
Teleport now will try to extract MySQL server version from initial handshake package instead of sending `8.0.0-Teleport` every time. This string can be overridden by new configuration option `mysql.server_version`. On DB service start Teleport will also try to fetch the current version from MySQL/MariaDB instance. After that the server version will be updated on every successful connection to keep it up to date.
Co-authored-by: STeve (Xin) Huang <xin.huang@goteleport.com>
Co-authored-by: Paul Gottschling <paul.gottschling@goteleport.com>