Skip to content

Add support in basetypes for ListValues.ElementsValuePointer #1232

@remyleone

Description

@remyleone

Module version

github.com/hashicorp/terraform-plugin-framework v1.16.1

Use-cases

When I'm in an update function, I sometimes have to deal with *[]string for a particular attribute in an update request.
It would be helpful to have a way right from types.List to have something ready to be written inside the type.

Attempted Solutions

I can have ad-hoc conversions inside the code of the update but it seems cumbersome to do it for all the different pointer on slice that have to be handled.

Proposal

Add to the types.List a method to have a pointer on this list of element. A little bit similar to what exist for a string: ValueStringPointer().

References

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