-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using PSRule v. 3.0.0-B0203 returning unexpected ''helper'' value when testing deployment names using custom rules #1847
Comments
Hi @lassehastrup, this is intended. It is the name used for the root deployment. i.e. the bicep + json parameter file. During a I agree the name Does that make sense? Or is there a clear preference for something different? |
Thanks, @BernieWhite . I'm still a little unsure to why this 'helper' is being used, but I assume you have good reasons. I will create another rule for this to 'allow' it. |
@lassehastrup Not sure if this helps the explanation, however: In a bicep file, each module reference becomes a deployment. For example this deployment is called module example './main.bicep' = {
name: 'deployment1'
params: {}
} However, there is actually two deployments occurring in the block of code.
You never specified the name of the root deployment in code, but when you trigger a deployment to Azure by running the Azure CLI/ Azure PowerShell/ Portal it is automatically created, based on the contents of The deployment in Azure would look like this:
Root deployment isn't the name of the deployment though, neither is deployment1 because it's not specified in code. If you ran the deployment on the command line i.e. In PSRule for Azure, we choose the name of the root deployment when using bicep code to be |
Description of the issue
I have previously created a bug report in regards to outputting the 'Reason' when validating resource names.
Therefore, I'm using the 3.0.0-B0203 version you released to perform some further testing, as we're in the process of adding a bunch of custom rules.
However, the 'Reason' is now outputting a strange message ''Helper'' which doesn't exist in the repository at all.
We're using a custom Rule to verify naming standards in bicep deployments using this type:
It seems to be populated from the backend in some way, as I'm getting the same error in every single repository I have tested this on; and none of the repos contains the words 'helper'.
To Reproduce
Steps to reproduce the issue:
I have created a small test scenario with the custom rule, option file and a simple bicep file to show the error received:
Download the folder below, and run the 'PSRulePreDeployment.ps1' script.
PSRule.zip
Expected behaviour
We don't expect to receive any errors in regards to the naming.
Error output
Module in use and version:
Using PSRule v3.0.0-B0203
Using PSRule.Rules.Azure v1.36.0
Using PSRule.Rules.CAF v0.3.0
Captured output from
$PSVersionTable
:Additional context
I hope this is the correct place to report issues on pre-releases.
The text was updated successfully, but these errors were encountered: