# Access privatestate from Configure

**URL:** <https://discuss.hashicorp.com/t/access-privatestate-from-configure/50918>\
**Category:** Plugin Development\
**Created:** [March 2, 2023, 11:03pm UTC](https://discuss.hashicorp.com/t/access-privatestate-from-configure/50918 "2023-03-02T23:03:40Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![OJFord](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/ojford/32/5035_2.png) [@OJFord](https://discuss.hashicorp.com/u/OJFord)\
**Post date:** [March 4, 2023, 5:26pm UTC](https://discuss.hashicorp.com/t/access-privatestate-from-configure/50918/11 "2023-03-04T17:26:51Z")

</div>

I already do that for the client itself, but this hack is for the account ID (d.client.Config.AccountToken) configured on it, which otherwise can’t that I can see be persisted between plan and apply.

> [@maxb](#):
>
> (Apparently the resource/datasource Configure methods get called passing `nil` sometimes… possible framework bug/design issue.)

Uncanny you should mention that, the subject of my previous question on this forum!

> [@Migrated to framework, provider Configure only being called for data sources?](https://discuss.hashicorp.com/t/migrated-to-framework-provider-configure-only-being-called-for-data-sources/50686):
>
> I started migrating one of my providers to use the ‘framework’ from sdkv2, but found in my Resource.Configure function that the req.ProviderData was always nil. After quite some confused flailing around, and setting up delve (though that’s a great win, should’ve done that long ago), I found it’s because the Provider.Configure function isn’t being called at all. After even more confused flailing, I discovered by chance that it does get called for a data source! (I tried a minimal terraform confi…

---

_[View the full topic](https://discuss.hashicorp.com/t/access-privatestate-from-configure/50918)._
