Skip to content

Add default values #131

@jkroepke

Description

@jkroepke

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

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

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions