digitalocean / doctl

The official command line interface for the DigitalOcean API.
https://docs.digitalocean.com/reference/doctl/
Apache License 2.0
3.24k stars 384 forks source link

Allow retrieving and updating database cluster configuration #1354

Open jnoordsij opened 1 year ago

jnoordsij commented 1 year ago

What is the problem this feature would solve? Please describe.

In the DO API docs, I found that it is possible to retrieve database cluster configuration and also to update it. However, using the API directly is somewhat cumbersome.

Describe the solution you'd like It would be great to have a doctl to do this, e.g. doctl databases configuration get <database-id>. The output would probably be JSON, or maybe could be formatted with a flag. For setting the input should probably also be JSON?

aswath-s-tw commented 11 months ago

Would like to pick this up. Please assign !

aswath-s-tw commented 11 months ago

Hi, I have a few queries

The godo.Client.DatabaseService has methods to get configuration for a particular engine ex. GetPostgreSQLConfig, GetRedisConfig, GetMySQLConfig, should we make our cli commands specific to an engine or call Get to know the EngineSlug and call the corresponding config method accrodingly ?

I think the same question applies of updating the config as well.

Thanks !

aswath-s-tw commented 11 months ago

Ping ! @danaelhe @jnoordsij

danaelhe commented 11 months ago

That's a great question! We're thinking to pass in an --engine flag as such: doctl databases configuration get --engine postgress <db-id>

For update the config, to avoid having to pass in a lot of flags, it would be better to just accept JSON.

aswath-s-tw commented 11 months ago

Thought of raising separate PRs for each subcommand. Will be doing it from this account -> https://github.com/titanventura

danaelhe commented 10 months ago

Partially solved in #1430 by adding implemmentation for doctl databases configuration get