Azure / Azure/PSRule.Rules.Azure
[FEATURE] Add support for predefined existing resource
- Dominant language
- PowerShell
- Stars
- 447
- Forks
- 109
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 23
Description
### Your suggestion
In https://github.com/microsoft/PSRule/issues/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:
- Perform automatic extraction of these directly from Azure - https://github.com/Azure/PSRule.Rules.Azure/issues/3658
- Implement a caching or way to store these definitions for use across multiple repositories in an enterprise - https://github.com/Azure/PSRule.Rules.Azure/issues/3659
Contributor guide
Assessment
This issue has not been assessed yet.