terraform-aws-modules / terraform-aws-rds-aurora

Terraform module to create AWS RDS Aurora resources πŸ‡ΊπŸ‡¦
https://registry.terraform.io/modules/terraform-aws-modules/rds-aurora/aws
Apache License 2.0
382 stars 551 forks source link

Add lifecyle ignore changes on AZs to aws_rds_cluster resource #446

Closed AkramDhiabi closed 2 months ago

AkramDhiabi commented 2 months ago

Is your request related to a new offering from AWS?

Is this functionality available in the AWS provider for Terraform? See CHANGELOG.md, too.

Is your request related to a problem? Please describe.

RDS automatically assigns 3 AZs if less than 3 AZs are configured, which will show as a difference requiring resource recreation next Terraform apply

Describe the solution you'd like.

I'm requesting an update to our RDS cluster Aurora module to include a lifecycle block with the ignore_changes configuration for the availability_zones argument. This change is necessary to address the following issue:

By adding the lifecycle block to ignore changes in availability_zones, we can maintain consistency in our configuration and avoid unnecessary resource recreation and downtime.

Describe alternatives you've considered.

Here is the code snippet to add here:

lifecycle {
  ignore_changes = [
    "availability_zones"
  ]
}

Additional context

N/A

bryantbiggs commented 2 months ago

I don't see a valid reason to ignore this - the API is clear in that its a replace operation when the value has changed https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-dbcluster.html#cfn-rds-dbcluster-availabilityzones

github-actions[bot] commented 1 month ago

I'm going to lock this issue 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 similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.