terraform-aws-rds-cluster icon indicating copy to clipboard operation
terraform-aws-rds-cluster copied to clipboard

implement create_before_destroy on instances

Open finchr opened this issue 11 months ago • 14 comments

what

I implemented create_before_destroy on the aws_rds_cluster_instance default instances.

why

Making a change to any parameter that triggers a replace on a aws_rds_cluster_instance results in all instances being destroyed before attempting to create a new instance which causes an outage. This a faster (and safer) altenative to #191

references

This closes #190 and is an alternative to #191

finchr avatar Feb 27 '24 18:02 finchr

/terratest

kevcube avatar Feb 28 '24 12:02 kevcube

~Is there an upgrade path for this? The random_pet name will require cluster destroy if upgrading the module.~

frimik avatar Feb 29 '24 12:02 frimik

Is there an upgrade path for this? The random_pet name will require cluster destroy if upgrading the module.

Hi @frimik this will not destroy the cluster, it will only replace the db instances.

finchr avatar Feb 29 '24 17:02 finchr

/terratest

hans-d avatar Mar 02 '24 00:03 hans-d

@finchr hi, can you follow up on the reported check errors? thanks

hans-d avatar Mar 02 '24 00:03 hans-d

/terratest

hans-d avatar Mar 08 '24 16:03 hans-d

@finchr hi, can you follow up on the reported check errors? thanks

Hi @hans-d sorry for the delay, I fixed the issue pushed the change.

finchr avatar Mar 08 '24 17:03 finchr

/terratest

hans-d avatar Mar 08 '24 17:03 hans-d

@Gowiem can you have a look content wise?

hans-d avatar Mar 08 '24 17:03 hans-d

TestExamplesServerlessV2PostgresDisabled 2024-03-08T17:32:33Z logger.go:66: ╷
TestExamplesServerlessV2PostgresDisabled 2024-03-08T17:32:33Z logger.go:66: │ Error: Provider produced inconsistent result after apply
TestExamplesServerlessV2PostgresDisabled 2024-03-08T17:32:33Z logger.go:66: │ 
TestExamplesServerlessV2PostgresDisabled 2024-03-08T17:32:33Z logger.go:66: │ When applying changes to
TestExamplesServerlessV2PostgresDisabled 2024-03-08T17:32:33Z logger.go:66: │ module.rds_cluster_aurora_serverlessv2_postgres_13.random_pet.instance,
TestExamplesServerlessV2PostgresDisabled 2024-03-08T17:32:33Z logger.go:66: │ provider "provider[\"registry.terraform.io/hashicorp/random\"]" produced an
TestExamplesServerlessV2PostgresDisabled 2024-03-08T17:32:33Z logger.go:66: │ unexpected new value: .prefix: was cty.StringVal(""), but now null.
TestExamplesServerlessV2PostgresDisabled 2024-03-08T17:32:33Z logger.go:66: │ 
TestExamplesServerlessV2PostgresDisabled 2024-03-08T17:32:33Z logger.go:66: │ This is a bug in the provider, which should be reported in the provider's
TestExamplesServerlessV2PostgresDisabled 2024-03-08T17:32:33Z logger.go:66: │ own issue tracker.

hans-d avatar Mar 08 '24 19:03 hans-d

@hans-d @finchr I'm going to call in @Nuru on this one... this is one of those types of changes we want to be very thoughtful about and I'm sure Jeremy will have opinions.

Gowiem avatar Mar 08 '24 21:03 Gowiem

Thanks @finchr for creating this pull request!

A maintainer will review your changes shortly. Please don't be discouraged if it takes a while.

While you wait, make sure to review our contributor guidelines.

[!TIP]

Need help or want to ask for a PR review to be expedited?

Join us on Slack in the #pr-reviews channel.

mergify[bot] avatar Mar 09 '24 04:03 mergify[bot]

This pull request now has conflicts. Could you fix it @finchr? 🙏

mergify[bot] avatar Mar 09 '24 04:03 mergify[bot]

This pull request now has conflicts. Could you fix it @finchr? 🙏

Conflicts resolved!

finchr avatar Mar 11 '24 16:03 finchr

[!IMPORTANT]

Cloud Posse Engineering Team Review Required

This pull request modifies files that require Cloud Posse's review. Please be patient, and a core maintainer will review your changes.

To expedite this process, reach out to us on Slack in the #pr-reviews channel.

mergify[bot] avatar May 07 '24 20:05 mergify[bot]

Hi @hans-d @Nuru , any update this?

finchr avatar May 08 '24 22:05 finchr

💥 This pull request now has conflicts. Could you fix it @finchr? 🙏

mergify[bot] avatar May 18 '24 03:05 mergify[bot]

This PR was closed due to inactivity and merge conflicts. 😭 Please resolve the conflicts and reopen if necessary.

mergify[bot] avatar May 18 '24 03:05 mergify[bot]

Seriously? You sit on this months and then request that I fix merge conflicts and close on the same day?

finchr avatar May 19 '24 19:05 finchr

Sorry about that. I think we have an edge condition with the mergify rules that caused that to happen. Please click the button to reopen the PR and work with someone in #pr-reviews channel to get this merged.

osterman avatar May 19 '24 19:05 osterman

Sorry about that. I think we have an edge condition with the mergify rules that caused that to happen. Please click the button to reopen the PR and work with someone in #pr-reviews channel to get this merged.

Hi @osterman I don't see a button or option to reopen the PR.

finchr avatar May 20 '24 13:05 finchr

Hrm... looks like it won't work to reopen.

image

osterman avatar May 20 '24 22:05 osterman

We'll need a net-new PR.

osterman avatar May 20 '24 22:05 osterman

OK, new PR is #213

finchr avatar May 21 '24 19:05 finchr