Example code to see configured resource details

I’m trying to write a utility in Go to parse terraform files used to configure Vault using the “vault” provider. Two of the target use cases would be 1) print all the token_policies associated with a vault_jwt_auth_backend_role and 2) print the policies associated with a vault_ldap_auth_backend_group.

I presume I need to use the terraform-provider-vault module to do the decoding, but what I’ve attempted has not been successful. My example code uses the terraform-config-inspect/tconfig module to load the terraform files, but once I have that I’m not sure how to point that config at the secret decoder ring that is the terraform-provider-vault/vault module.

Does anyone have a link to some example code that will take tconfig.Module.ManagedResources and use the terraform provider’s resource definitions to show more detailed output about those resources?