hashicorp / hashicorp/terraform-plugin-framework-timeouts

Add default values

Open
#131 1 comment 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Go
Stars
11
Forks
4
Avg merge
3m
Merged PRs (30d)
1

Description

### Terraform CLI and Framework Versions

Terraform v1.8.1
on darwin_amd64

github.com/hashicorp/terraform-plugin-framework

### Use Cases or Problem Statement

Provide default values on `timeouts.BlockAll` and `timeouts.Block`.

While it's possible to define a reasonable default inside the operation method, it's missing as part of the documentation.

Passing the default values earlier would result into better end-user documentation by default.

### Proposal

```go
timeouts.BlockAllWithDefaults(ctx, map[string]time.Duration{
"create": 5 * time.Minute,
"read": 5 * time.Minute,
"update": 5 * time.Minute,
"delete": 5 * time.Minute,
})
```

### Additional Information

I'm aware thats currently possible with custom description, however such functions would enrich the developer experience with an work out of the box scenario.

### Code of Conduct

- [X] I agree to follow this project's Code of Conduct

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.