Skip to content

feat: add custom cluster endpoints #233

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

Conversation

cageyv
Copy link

@cageyv cageyv commented Aug 13, 2021

Description

  • Add cluster custom endpoints aws_rds_cluster_endpoint

Motivation and Context

  • Using custom endpoints will help maintain the cluster
    • exclude the node from the custom endpoint
    • wait for all connections drained
    • maintain node without connections
    • add the node back to the endpoint

Aurora.Endpoints.Custom

How Has This Been Tested?

  • I have tested and validated these changes using one or more of the provided examples/* projects

Additional info

READER type will be empty in case we run a single node cluster.
Because there are no readers. Just one writer node.

Endpoints will have enabled the option "Attach future instances added to this cluster" by default
Because there are no static_members and we ignore them for now

Future improvments

  • static_members and excluded_members lists

@cageyv
Copy link
Author

cageyv commented Aug 13, 2021

READER type will be empty in case we run a single node cluster.
Because there are no readers. Just one writer node.

Endpoints will have enabled the option "Attach future instances added to this cluster" by default
Because there are no static_members and we ignore them for now

@cageyv cageyv marked this pull request as ready for review August 13, 2021 17:36
@cageyv cageyv requested a review from bryantbiggs August 13, 2021 17:40
@cageyv
Copy link
Author

cageyv commented Aug 16, 2021

For outputs, I took the same design as for the VPC module

@cageyv cageyv changed the title feat/add custom cluster endpoints feat:add custom cluster endpoints Aug 16, 2021
@cageyv cageyv changed the title feat:add custom cluster endpoints feat: add custom cluster endpoints Aug 16, 2021
@cageyv
Copy link
Author

cageyv commented Aug 16, 2021

@bryantbiggs @antonbabenko Anything else we need to add or describe?

main.tf Outdated
custom_endpoint_type = each.value

lifecycle {
ignore_changes = [excluded_members, static_members]
Copy link
Member

Choose a reason for hiding this comment

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

I don't yet know what the ramifications of this are. we don't have these attributes set here, and yet we are ignoring them from future changes. we generally try to avoid the use of the ignore_changes lifecycle hook because it cannot be parameterized. I will have to do some tests to see what makes the most sense for this

Copy link
Author

Choose a reason for hiding this comment

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

I'll do a couple of tests on my own. I am currently using this version and will check the behavior without ignoring

Copy link
Author

@cageyv cageyv Aug 16, 2021

Choose a reason for hiding this comment

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

We can use static_members for case then we need include only instances created by Terraform (by this module)
If we need reader endpoints only with nodes managed from iac.

And we can use excluded_members for case then we need exclude all instances created by this module.

By default both will be empty

var.cluster_custom_endpoints_only_static_members = false
var.cluster_custom_endpoints_all_excluded_members = false

@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 13, 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