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

feat: Add customizable instance settings #132

Closed
wants to merge 1 commit into from

Conversation

kostyaplis
Copy link

Description

Inspired by #119. Added with readme, example and requested changes.

Allow setting individual parameters for cluster instances

Motivation and Context

We needed to add additional read only replica, for reporting needs. Some small instance type was enough for this task, however module allows only to specify number of nodes which share same parameters. We also needed to customize instance name and failover priority - promotion_tier (we do not want to failover to small instance).

Breaking Changes

Requires TF >= v0.12
It is 100% compatible with previous versions.
If you specify variable in a module call:

replica_count = 3

instances_parameters = [
{
  instance_name = "db-a"
  instance_type = "db.r5.large"
  instance_promotion_tier = 1
},
{
  instance_name = "db-b"
  instance_type = "db.t3.medium"
  instance_promotion_tier = 10
},
{
  instance_promotion_tier = 15
}
]

Customised setting will be used if they are set. If settings are missing module will generate like in previous version name, promotion_tier and will use var.instance_type for all nodes.

How Has This Been Tested?

Tested on our AWS Dev account.
Tested cases:

  • create brand new cluster without instances_parameters set
  • create brand new cluster with instances_parameters set
  • adding instances_parameters to an existing cluster
  • removing instances_parameters from an existing cluster

@antonbabenko
Copy link
Member

Resolved in #146

v2.26.0 has been just released.

@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants