hashicorp / hashicorp/terraform-plugin-sdk
Determine provider SDK strategy for minimizing API calls
- Dominant language
- Go
- Stars
- 485
- Forks
- 244
- Avg merge
- 19h 57m
- Merged PRs (30d)
- 4
Description
## Data sources
Data sources currently can't take advantage of Etag-based (or really any other) caching. Whenever a data source is refreshed, the SDK does not read any existing state, so etag is ignored, even if it's stored there as a computed attribute.
## Resources
While resources can technically be cached on Etag basis, I think we could do better and make it easier for arbitrary APIs which follow the convention and use the `Etag` header, perhaps through some helper functions that can be plugged in as HTTP transports or something like that.
To start with we could adopt https://github.com/terraform-providers/terraform-provider-github/blob/2eaf170dbd1efa403d3bce08ade826c827a4063b/github/transport.go#L21-L40 in some form to the SDK.
Contributor guide
Assessment
This issue has not been assessed yet.