Conversation
| github.com/hashicorp/terraform-plugin-framework v1.17.1-0.20260223163459-7b6eb103b2e8 | ||
| github.com/hashicorp/terraform-plugin-go v0.29.1-0.20260122204301-b0a6aca80fd7 |
There was a problem hiding this comment.
I guess we need to wait for Framework and plugin-go to be released until we merge this PR (or at least until we release the timeouts package after merging this)
There was a problem hiding this comment.
Looks like this PR just needs to be rebased and it'll bring in the right framework Go module 👍🏻
| github.com/hashicorp/terraform-plugin-framework v1.17.1-0.20260223163459-7b6eb103b2e8 | ||
| github.com/hashicorp/terraform-plugin-go v0.29.1-0.20260122204301-b0a6aca80fd7 |
There was a problem hiding this comment.
Looks like this PR just needs to be rebased and it'll bring in the right framework Go module 👍🏻
| // StateStore attempts to retrieve the "statestore" attribute and parse it as time.Duration. | ||
| // If any diagnostics are generated they are returned along with the supplied default timeout. | ||
| func (t Value) StateStore(ctx context.Context, defaultTimeout time.Duration) (time.Duration, diag.Diagnostics) { | ||
| return t.getTimeout(ctx, attributeNameStateStore, defaultTimeout) | ||
| } |
There was a problem hiding this comment.
I think this highlights a question about what exactly timeouts would be used for in state stores. This method/usage should be named based on the actual operation where the timeout data is relevant, not the name of the type itself.
For example:
- Data source -> Read
- Action -> Invoke
- Resource -> Create, Read, Update, or Delete
So for state stores, it should be named based on which operation the timeout is relevant to (Read, Write, Lock, Unlock, etc.): https://github.com/hashicorp/terraform-plugin-framework/blob/c957640a318c5f774bafc672a6db0fee71a638f8/statestore/statestore.go#L20-L54
If there isn't a clear idea, I think it's also reasonable to just wait until there is an ask to implement this
| ) | ||
|
|
||
| const ( | ||
| attributeNameStateStore = "statestore" |
There was a problem hiding this comment.
See other comment, but this should be related to the operation the timeout applies to
Related Issue
Description
Added StateStore to timeouts package
Rollback Plan
Changes to Security Controls
Are there any changes to security controls (access controls, encryption, logging) in this pull request? If so, explain.
No