terraform-plugin-framework
terraform-plugin-framework copied to clipboard
Provide user config during import
Module version
0.4.2
Use-cases
It would be very useful during import if the request object contained the Config of the resource block attempting to be imported into. I have a resource that only reads certain keys from the API response if they are present in the config.
Hey @appilon 👋 Just to drop a quick note -- this will require upstream changes in Terraform CLI, the protocol, and terraform-plugin-go before this it can potentially be implemented. We are overdue to submit a more formal proposal issue on the topic. For additional context see:
https://github.com/hashicorp/terraform-plugin-go/blob/d36cd4c7fc48ae8bc44991b2445b96a242748893/tfprotov6/internal/tfplugin6/tfplugin6.proto#L294-L297
The closest Terraform CLI issue I found was https://github.com/hashicorp/terraform/issues/28536, although that is only a related problem for Terraform-only attributes.
Thanks for the update, It's only a UX nuisance for me at this time, I instruct via warning that after import the user needs to run apply again to sync the Map in config (that presently doesn't exist in state).