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 serverlessv2_scaling_configuration to secondary cluster #171

Conversation

raymondchen625
Copy link

what

Add aurora serverlessv2 support for configuration of cluster_type="global".

why

In the PR #138 , the serverlessv2_scaling_configuration argument was only added to the resource aws_rds_cluster.primary, which is in effect when clsuter_type is regional. It should also be added to the resource aws_rds_cluster.secondary to cover the case when cluster_type is global.

references

#138

@raymondchen625 raymondchen625 requested review from a team as code owners June 15, 2023 13:17
@raymondchen625
Copy link
Author

I pushed a new commit b194b10.

  • It adds the db_cluster_instance_class to the secondary cluster similar to the serverlessv2_scaling_configuration.
  • The aws_rds_cluster_instance.instance_class only uses the value from var.instance_type because I'm trying to use the serverlessv2_scaling_configuration to handle the issue Action of deleting serverlessv2_scaling_configuration has no effect #168: Once my cluster creates a serverless reader and deletes it later, the describe-db-clusters API call will always have a new ServerlessV2ScalingConfiguration field. There is no way to delete it. From what I see in the AWS Provider's source code, this change is ignored. The next terraform plan will detect the change to delete this ServerlessV2ScalingConfiguration setting again. As a workaround before AWS API and the terraform provider provide the capability to delete it, I'd like to add the ServerlessV2ScalingConfiguration in my TF config to match the response from AWS API to silence the detected changes. The previous condition makes this workaround impossible.

@goruha
Copy link
Member

goruha commented Jun 21, 2023

/terratest

@raymondchen625
Copy link
Author

/terratest

@hans-d hans-d added the stale This PR has gone stale label Mar 2, 2024
@hans-d hans-d closed this Mar 2, 2024
@raymondchen625 raymondchen625 deleted the secondary_cluster_serverlessv2 branch September 4, 2024 18:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale This PR has gone stale
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants