Another set of eyes here pleae <https://github.com...
# pr-reviews
r
✅ 1
❌ 1
So it seems the fix might be to migrate the
global_secondary_index
to the new experimental`aws_dynamodb_global_secondary_index` resource? 🤔
Ahh… but it is experimental which seems risky
g
@johncblandii @Andriy Knysh (Cloud Posse)
a
@RB I'm not sure what's the best approach here 🙂 • If we merge the PR, that will work (until someone wants to update/add secondary indexes, in which case it does not work anymore and requires jumping through many hoops) •
aws_dynamodb_global_secondary_index
would fix the issue, but it's experimental
what we did before, is solution # 3:
add a variable to enable/disable including an attribute into the lifecycle management. You will need to repeat the code - it's two resources instead of one b/c the lifecycle does not support dynamic variables
r
ugh, i guess now that im reading more about it, i dislike all of the options, but the option that i least dislike is option 2, the experimental resource
thanks for reviewing andriy
a
we don't even know if the new experimental`aws_dynamodb_global_secondary_index` resource will not drift in the same way - the autoscaler changes the index capacity, and terraform shows the same drift, but now on this new resource (in which case we are back to option #1 (implemented in the PR) or option #3)
r
ugh… also option 2 requires an experimental environment variable for everyone. it’s not a viable solution for a module.
# 3 is the ugliest because 2 resources, exactly the same, but with different lifecycle.ignore_rules would need to be maintained