Hi all
I have the following issue. I have 3 subscriptions in azure: workload, management and connectivity. I want to deploy some resource, e.g. an ACR in into workload and then create private endpoints into the management and connectivity. As I need the resource-id from the ACR in the workload once created I have trouble to find the best way to archive this in a clean terraform way.
What do you think is the best approach todo this.
a) Create 3 different terraform projects, each working their own subscription/single azurerm provider setting and pass information with the help of output and variable between them. This would mean there is an dependency between workload and management/connectivity and there is a strict order in which they can and should run.
b) Querying the remote state in managment/connectivity to find out the resource_id of the created acr and then create the private endpoints.
c) Query the resource id with data and create the endpoints on this basis. This would require two provider blocks for azurerm.
d) Create all resources in a same project lets say ACR project which has also two provider blocks defined and creates both resources and pass the resource id through the normal resource
e) any other ideas?
In general this can be broken down to what is the best way to actually pass information from one terraform project to another or create a big project where all the resources are in.
Best
T