I’m very new to terraform and go as a whole, but would like to understand how providers operate during terraform operations (apply mostly).
If I have 2+ resources that use the same provider, will the provider be instantiated twice, or does it stay in memory after the first resource is executed? Is it possible to have a global var/object that stays in memory until the process is complete? Will/Can the var/object be referenced by both resources to save time?
I’d like to create a provider that requires substantial time to initialize and connect to a remote service but save the time of initializing the connection.