I would like this resource to recreate every 90 days to have a RSA key rotated for compliance reason.
I have tried triggers {}, keepers{}, lifecycle{} with time provider, seems these blocks aren’t supported inside tls_private_key resource.
sample Error for triggers
Error: Unsupported argument
│ on generate_rsa.tf line 7, in resource "tls_private_key" "rsa":
│ 7: triggers = {
│ An argument named "triggers" is not expected here.
Is there any other way to auto-rotate RSA key based on time using Terraform? Excluding - explicit taint
triggers and keepers might be attributes of some certain resources, but they are not universal features of the language. The lifecycle block however is universal for all managed resources, so I’m not sure how that didn’t work for your use case.