Caching login credentials for provider

I’m writing a provider for an internally used tool, which does not allow more than a handful of logins every two minutes. Is there a way to cache the requested login token between Terraform runs?

Terraform providers are just programs like any other - if you want to implement caching of login tokens in a file on disk, you can - just make sure to set appropriately secure file permissions, and only use tokens from the cache when the Terraform configuration really is specifying the same original credentials as were used to acquire the cached token. Terraform itself doesn’t have any special support for this, it would all be code you write yourself in your provider.

That makes a lot of sense, actually. What I need to figure out, in that case, is what a sensible place to store information like this is…

A file in the home directory of the OS user invoking your provider, is the only realistic cross-platform case, short of using OS-specific secrets stores.