Your suggestion
In microsoft/PSRule#3105 @riosengineer describes several cases where the ability to reference existing resource state from Azure in deployments/ deployment stacks is ideal.
We should add the ability to define an existing resource such as a deployment stack or shared infrastructure that can be used instead of a mock resource.
Since the ability to export resources from Azure for in-flight analysis already exists, this is a logical extension of that functionality but allows that exported data to be exposed for pre-flight analysis.
These exported resources could be committed to the repository or generated by some other process at runtime.
Alternatives
While mocking generally works, it performs poorly in the cases when you are trying to reference a deployment/ deployment stack output from a previous deployment that is not deployed through the current deployment.
Additional context
Separate work items should also look to:
Your suggestion
In microsoft/PSRule#3105 @riosengineer describes several cases where the ability to reference existing resource state from Azure in deployments/ deployment stacks is ideal.
We should add the ability to define an existing resource such as a deployment stack or shared infrastructure that can be used instead of a mock resource.
Since the ability to export resources from Azure for in-flight analysis already exists, this is a logical extension of that functionality but allows that exported data to be exposed for pre-flight analysis.
These exported resources could be committed to the repository or generated by some other process at runtime.
Alternatives
While mocking generally works, it performs poorly in the cases when you are trying to reference a deployment/ deployment stack output from a previous deployment that is not deployed through the current deployment.
Additional context
Separate work items should also look to: