-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
[Bug]: cannot enable transit encryption on aws_elasticache_replication_group (engine=redis) #33403
Comments
Community NoteVoting for Prioritization
Volunteering to Work on This Issue
|
I thought the workaround would be to simply add
to the Error: aws_elasticache_cluster does not support transit encryption using the redis engine, use aws_elasticache_replication_group instead |
I've encountered this issue as well. We do not specify the variable in our case and even after recreating the cluster, the next plan sees the value set to true and wants to force a new replacement. This seems to be never-ending and terraform is never happy with the existing cluster. |
I think that in the case of an elasticache redis cluster with Because it defaults to AFAIK, the only way to enable transit encryption for an elasticache redis cluster is to do it at the replication group level, which we have done. But with this latest code change, every plan will want to replace the cluster. This is a big problem. Also, I don't think that replacing the cluster in this scenario makes sense. If this property can't be used for elasticache redis to control transit encryption, why should a change to its value force a replacement of the cluster? |
I too facing the same issue, |
Hey @jpriebe 👋 Thank you for taking the time to raise this! Edit: I see that |
Hello everyone - apologies for the regression this change introduced. For those currently impacted and awaiting a fix, the resource "aws_elasticache_cluster" "example" {
# ...
lifecycle {
ignore_changes = [
transit_encryption_enabled,
]
}
} |
thanks, @jar-b. That looks promising. For the time being, we're hoping for a speedy fix, so we have just constrained our provider version to < 5.16.0. When the fix is released, we'll remove that constraint. |
I had attempted this as a temp workaround but, unfortunately, it doesn't work. With this lifecycle argument in place a plan results in "Error: aws_elasticache_cluster does not support transit encryption using the redis engine, use aws_elasticache_replication_group instead" Placing the same lifecycle argument into the replication group resource has no effect. Terraform still attempts to change the transit_encryption_enabled value to false which forces a replacement. As jpriebe mentioned we've just limited our provider for now which alleviates the issue until a fix can be implemented. Just wanted to share that lifecycle doesn't provide the anticipated result |
🤦 - thanks @Atken, forgot about the CustomizeDiff functions that were implemented around this which happen regardless of whether that lifecycle argument is set. In the case of |
This functionality has been released in v5.17.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you! |
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. |
Terraform Core Version
1.2.9
AWS Provider Version
5.16.1
Affected Resource(s)
Note: the title of this issue may be a little misleading. Technically, you can create an elasticache redis replication group with transit encryption enabled. The problem is that every apply after that will replace the cluster. A resource that gets replaced on every apply (especially a stateful resource) is not a very useful resource. So in effect, you really can't create a replication group with transit encryption enabled.
Expected Behavior
Our code provisions an
aws_elasticache_cluster
as a member of anaws_elasticache_replication_group
(redis). We seton the
aws_elasticache_replication_group
. For elasticache redis, transit encryption must be enabled at the replication group level.No code changes were made to our elasticache terraform. We do not expect to see any changes to our existing clusters.
Actual Behavior
When we ran our pipelines today, we pulled down version 5.16.1 of the provider, and the plan indicated that it wants to replace the
aws_elasticache_cluster
.If you apply this change, your next plan will indicate the same change. You will have to replace the cluster every time you apply.
Relevant Error/Panic Output Snippet
No response
Terraform Configuration Files
Any basic
aws_elasticache_replication_group
will suffice to replicate. You just have to settransit_encryption_enabled
to true in the replication group and leave it unspecified in the cluster (this has been the way to enable transit encryption for redis clusters).Steps to Reproduce
Use AWS provider 5.16.0 or up.
Apply your replication group and cluster terraform, and you will get a cluster with transit encryption enabled. Then run a plan (with no code changes), and you will see a change that forces replacement of the cluster.
Debug Output
No response
Panic Output
No response
Important Factoids
No response
References
No response
Would you like to implement a fix?
None
The text was updated successfully, but these errors were encountered: