[SOLVED] Custom provider, is it possible read an attribute value from main.tf rather state while destroy?


We have a custom home grown provider.
Which has func resourceIamCreate, func resourceIamDelete etc.
While performing the create (func resourceIamCreate), it takes the attribute(change_ticket) value from the main.tf file and state get updated with value of attribute change_ticket.

When perform destroy (func resourceIamDelete), it reads the value of change_ticket from state rather from our main.tf file.

Is there a way we can make delete read the value of change_ticket from main.tf file?


I found the solution,

I rebuilt the provider after moving change_ticket as provider input in provider.go and now I can pass change_ticket for destroy