-
-
Notifications
You must be signed in to change notification settings - Fork 188
feat: Added option to ignore changes to GSIs #72
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: Added option to ignore changes to GSIs #72
Conversation
I am going to test this properly, is this sort of change acceptable at all? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is a valid case since there has been no visible traction for this issue in the Terraform AWS provider for the last 5 years.
Yeah it does seem to be a long term problem! Thanks for this, I will clean up the PR and get it tested. |
375f03d
to
65b0b22
Compare
I'll ping back once I've fully tested this. |
Tested the autoscaling example and it's all working as expected (output attached):
|
I've updated the README as well, let me know if it needs anymore detail @antonbabenko. |
f5b020b
to
2f62e3d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Almost perfect!
@@ -35,6 +35,13 @@ There are two separate Terraform resources used for the DynamoDB table: one is f | |||
terraform state mv module.dynamodb_table.aws_dynamodb_table.this module.dynamodb_table.aws_dynamodb_table.autoscaled | |||
``` | |||
|
|||
**Warning: autoscaling with global secondary indexes** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding this note!
2f62e3d
to
af27940
Compare
This relates to this issue - hashicorp/terraform-provider-aws#671. When using autoscaling with a provisioned table that has a GSI applying a TF change whilst the indices are scaled will reset capacity, which can be dangerous. This change has an option to ignore changes to global_secondary_index, which seems to be the only way to deal with this issue at present.
af27940
to
b621b44
Compare
@antonbabenko fixed those issues. |
## [3.3.0](v3.2.0...v3.3.0) (2023-05-25) ### Features * Added option to ignore changes to GSIs ([#72](#72)) ([44187e9](44187e9))
This PR is included in version 3.3.0 🎉 |
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. |
Description
This relates to this issue - hashicorp/terraform-provider-aws#671.
When using autoscaling with a provisioned table that has a GSI applying a TF change whilst the indices are scaled will reset capacity, which can be dangerous. This change has an option to ignore changes to global_secondary_index, which seems to be the only way to deal with this issue at present.
Motivation and Context
Without this change, using this module in the context described above can be dangerous.
Breaking Changes
This change should be backwards compatible.
How Has This Been Tested?
examples/*
to demonstrate and validate my change(s)examples/*
projectspre-commit run -a
on my pull request