Does terraform have a self-programming to destroy or create the infrastructure?

Hi!! I would like to know if in terraform, there is any configuration that we pass that we can define a time interval for it to self-destruct or even create.

Or if this would only be possible even with a shell script programmed in cron?