We have a lot of database connections to keep track of. The connection parameters are defined in Chef data bags. I would like an easy way to use the chef data bags to create data sources in DataGrip. I successfully wrote a little python script to parse the data bags and spit out a dataSources.xml and dataSources.local.xml file but this has two drawbacks: 1) it does not enter the passwords since they are managed via keyrings and 2) it replaces the config you already have so you can't really use it if you have some custom connections already set up.
My thought was to write a plugin that would let you import a data source from the Chef data bag (JSON). I have a simple plugin and can use it to ask the user for files to import but I am not seeing a way to create a new data source. All of the database related interfaces seem to only expose read operations. (DbPsiFacade, DatabaseSystem, the deprecated DataSourceManager and DbDataSource, etc)
Am I missing something or is creating data sources not something that is exposed via the API for plugins to use?