Use already initialized API client in GetIDFn
- Dominant language
- Go
- Stars
- 481
- Forks
- 131
- Avg merge
- 2d 1h
- Merged PRs (30d)
- 11
Description
**Feature Request**
Can we add to the parameter `terraformProviderConfig` of the `GetIDFn` the `meta` value? So that `ts.Map()`, which is passed into the `GetIDFn` returns also the `Meta` property?
```
// GetIDFn returns the ID to be used in TF State file, i.e. "id" field in
// terraform.tfstate.
type GetIDFn func(ctx context.Context, externalName string, parameters map[string]any, terraformProviderConfig map[string]any) (string, error)
```
https://github.com/crossplane/upjet/blob/ce71033d450f88a7b499984fd3f3aa621f9cc9f9/pkg/controller/external_tfpluginsdk.go#L145-L148
https://github.com/crossplane/upjet/blob/ce71033d450f88a7b499984fd3f3aa621f9cc9f9/pkg/terraform/store.go#L136-L146
https://github.com/crossplane/upjet/blob/ce71033d450f88a7b499984fd3f3aa621f9cc9f9/pkg/terraform/store.go#L127-L129
**UseCase:**
It is necessary to execute an request via the API client during retrieving the Id via `GetIDFn`. It would make sense to use the already initialized API client instead of creating a fresh one.
Contributor guide
Assessment
This issue has not been assessed yet.