Skip to content
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

Add option to cache response for a TTL #450

Open
1 task done
mmueller-rs opened this issue Aug 22, 2024 · 0 comments
Open
1 task done

Add option to cache response for a TTL #450

mmueller-rs opened this issue Aug 22, 2024 · 0 comments

Comments

@mmueller-rs
Copy link

Terraform CLI and Provider Versions

Terraform v1.9.5
on darwin_arm64
+ provider registry.terraform.io/hashicorp/http v3.4.4
+ provider registry.terraform.io/hashicorp/kubernetes v2.32.0
+ provider registry.terraform.io/hashicorp/local v2.5.1
+ provider registry.terraform.io/hashicorp/null v3.2.2

Use Cases or Problem Statement

We're planning to use the http provider to query a REST Api and receive a Token that we'll use in the provider-configuration of another provider.
Every time the Terraform code is planned or applied, a new Token is created, causing lots of requests to the API-Server, as well as planned changes on every run/plan. Especially during development of a new feature, this can become quite messy.

Proposal

It would be great if one could specify a TTL for the Response, so that the result of the Statefile could be reused as long as it's still valid.
Default should be 0.

How much impact is this issue causing?

Low

Additional Information

A similar request can be found in #335, but the difference is that in my case, the result of a previous run should be used. But maybe the solution to the two issues could be combined.

Code of Conduct

  • I agree to follow this project's Code of Conduct
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant