# Terraform Provider Framework for Custom Providers: Map Objects

**URL:** <https://discuss.hashicorp.com/t/terraform-provider-framework-for-custom-providers-map-objects/45649>\
**Category:** Terraform Providers\
**Created:** [October 14, 2022, 7:56pm UTC](https://discuss.hashicorp.com/t/terraform-provider-framework-for-custom-providers-map-objects/45649 "2022-10-14T19:56:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![gstotts](https://avatars.discourse-cdn.com/v4/letter/g/ba8739/32.png) [@gstotts](https://discuss.hashicorp.com/u/gstotts)\
**Post date:** [October 14, 2022, 7:56pm UTC](https://discuss.hashicorp.com/t/terraform-provider-framework-for-custom-providers-map-objects/45649/1 "2022-10-14T19:56:31Z")

</div>

Going through the tutorial for creating a custom provider using the beta Terraform Provider Framework but don’t see an example of how to handle setting types.Map values returned from APIs.

For example, an API returns a map called config that looks like:

```auto
{
  "config": {
    "item1": "value1",
    "item2": "value2",
  }
}

```

I can set this as types.Map in my struct but when I get the data from the api client, it is as a map[string]string value type. I tried using something like types.Map{Value: data.Config} where data.Config is the map[string]string returned from the API, but this does not work because it is not of the proper type. Any assistance or examples of how to handle these would be helpful – still navigating a lot of go and TF provider creation so there could be something I’m completely missing. Thanks.
