Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Redis config option number_of_databases #1022

Closed
wants to merge 1 commit into from
Closed

Add Redis config option number_of_databases #1022

wants to merge 1 commit into from

Conversation

LachlanArthur
Copy link

This PR adds support for the DO database cluster config option redis_number_of_databases via the argument number_of_databases:

resource "digitalocean_database_cluster" "foobar" {
  engine              = "redis"
  ...
  number_of_databases = 128
}

Copy link
Member

@andrewsomething andrewsomething left a comment

Choose a reason for hiding this comment

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

Hi @LachlanArthur!

Thanks for this great contribution.

The DigitalOcean API has grown a lot of additional configuration options that are specific to the individual database engines. As we add support for more here, I'm afraid that we'll be overloading the digitalocean_database_cluster resource with options that are only relevant to sub-sets of users and making it more difficult to maintain moving forward.

For instance with Redis, there are more options that we will likely want to add than just number_of_databases:

https://github.com/digitalocean/godo/blob/3a26e25b76a419426decf9c9f1e0c1b45c9e06b2/databases.go#L504-L516

I'm thinking that it might make more sense to create a new digitalocean_redis_configuration (or similar) resource to hold all of these options rather than further extending the base database resource.

@andrewsomething
Copy link
Member

Hi @LachlanArthur,

I've implemented the approach I suggested in a new PR: #1037 It supports the number_of_databases as well as all the other options exposed by that endpoint.

Let me if you have any feedback on that PR, and thanks for starting the conversation on how we can support these options in the Terraform provider.

@LachlanArthur LachlanArthur deleted the feat/redisNumberOfDatabases branch October 5, 2023 01:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants