I am developing the citrixadc provider ( https://github.com/citrix/terraform-provider-citrixadc ).
We recently had a user case where there was the need to instantiate an AWS VM with a Citrix ADC image and then go on to configure this instance with the citrixadc provider.
The problem is that the citrixadc provider needs the ip address of the primary network interface to instantiate the NITRO API client, which is not known during the plan step of terraform.
We suggested the solution of applying the configuration in two steps, first apply the aws_instance configuration and then use the exported values to apply the citrixadc configuration.
Nevertheless the user would like to do this operation in a single plan and apply step.
The only way to accommodate this in the provider would be to have each resource instantiate its own NITRO API client to communicate with the target ADC.
That means for each resource we would need to define all the provider attributes as input parameters and use them to instantiate the client.
Since we plan to have the provider certified at some point in the future I would like to ask if this design is advisable.
What is the recommended way to handle such a use case?