Lifecycle rules lab, purposes of "keepers" map-type argument?

For this lab, there is this section:

All the resources for the random provider can be recreated by using a map type argument called keepers. A change in the value will force the resource to be recreated.

This argument accepts arbitrary key/value pairs and in our example, it is set to the key called length whose value was updated from 10 to 12 in the variables.tf file.

Running a terraform apply now will destroy the current random_string resource and then create a new one with the length that is 12 characters long.

What is the purpose of the keepers “map-type” argument? The prompt says that a change in the value will force the resource to be recreated and is set to the key called length. My question is, why do we need this at all? If the length variable changes then the resource will be recreated anyway. What is the purpose of this “keepers” key and what is the benefit? I wish there was some explanation as to map-type arguments or “keepers” in the lecture before showing us this in the lab.

I appreciate any help. Thank you.

If any of the values you put within the keepers block changes, then the resource is recreated. All the resources in the random provider support keepers

For instance, if you were deploying EC2 instances in AWS, and you needed some random identifier for each instance type (defined by AMI ID which you’ll put in keepers), then when the AMI ID is the same, they will all get the same random string, and when the AMI ID changes, you’ll get a new random string