hashicorp / terraform-provider-hashicups

Terraform Provider HashiCups - Provider Plugin Framework example
58 stars 52 forks source link

provide examples with types.Set , types.Map, and types.List data structures #65

Closed benoittoulme closed 1 year ago

benoittoulme commented 1 year ago

We have been trying to use types.Set in our custom terraform provider, and we are not sure how to use this type correctly. We would appreciate an example of usage of this type. In particular, it is not clear to us if it is possible to use a type.Set with complex data structures?

Can you provide more complex examples using types.Set , types.Map, and types.List data structures?

Thank you. Enjoying the plugin framework so far, and looking forward to completing the conversion of our provider.

bflad commented 1 year ago

Hi @benoittoulme 👋 Thank you for writing in about this and apologies for the lack of clear guidance on what you are trying to do, which is a common use case. While the tutorial provider may be able to implement additional code such as this, we are also taking a look at this within the framework's website documentation in https://github.com/hashicorp/terraform-plugin-framework/issues/695. It might be good to subscribe, 👍 , and optionally provide any additional context to help improve the framework's overall documentation. Thanks so much.

bflad commented 1 year ago

Oh! And since it sounds like you might have a general question, there is also HashiCorp Discuss where developers and framework maintainers often exchange answers for topics like these.

benoittoulme commented 1 year ago

Thank you for the recommendations. I will follow up. For anyone looking, somehow I missed some of the providers that were already written with the plugin framework in Hashicorp github domain... Good examples with more complex data structures, for example in https://github.com/hashicorp/terraform-provider-tls.

@bflad I let you close this issue if you think that the links above are enough. I think I found what I need. Thank you so much.