-
Notifications
You must be signed in to change notification settings - Fork 518
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Initial PSRule without parameter files #206 * Update triggers and reference extension * Separate job to ignore build bicep code * Update PSRule options to include Bicep samples
- Loading branch information
1 parent
7f35807
commit 8f4089d
Showing
5 changed files
with
106 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"recommendations": [ | ||
"ms-azuretools.vscode-bicep", | ||
"bewhite.psrule-vscode" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"type": "PSRule", | ||
"problemMatcher": [ | ||
"$PSRule" | ||
], | ||
"label": "PSRule: Run analysis", | ||
"presentation": { | ||
"panel": "dedicated", | ||
"clear": true | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# | ||
# PSRule for Azure configuration | ||
# | ||
|
||
# Please see the documentation for all configuration options: | ||
# https://aka.ms/ps-rule-azure | ||
|
||
# Use rules from the following modules/ | ||
include: | ||
module: | ||
- 'PSRule.Rules.Azure' | ||
|
||
# Require a minimum version of modules that include referenced baseline. | ||
requires: | ||
PSRule.Rules.Azure: '@pre >=1.14.2' | ||
|
||
# Reference the repository in output. | ||
repository: | ||
url: https://github.com/Azure/ALZ-Bicep | ||
|
||
execution: | ||
# Ignore warnings for resources and objects that don't have any rules. | ||
notProcessedWarning: false | ||
|
||
configuration: | ||
# Enable expansion for Bicep source files. | ||
AZURE_BICEP_FILE_EXPANSION: true | ||
|
||
# Expand Bicep module from Azure parameter files. | ||
AZURE_PARAMETER_FILE_EXPANSION: true | ||
|
||
# Set timeout for expanding Bicep source files. | ||
AZURE_BICEP_FILE_EXPANSION_TIMEOUT: 15 | ||
|
||
input: | ||
pathIgnore: | ||
# Ignore common files that don't need analysis. | ||
- '**/bicepconfig.json' | ||
- '*.md' | ||
- '*.png' | ||
- '.github/' | ||
|
||
# Exclude Bicep docs files | ||
- docs/scripts/callModuleFromACR.example.bicep | ||
|
||
# Exclude Bicep module files | ||
- 'infra-as-code/bicep/modules/**/*.bicep' | ||
- 'infra-as-code/bicep/CRML/**/*.bicep' | ||
|
||
# Include samples/ test files from modules | ||
- '!infra-as-code/bicep/modules/**/samples/*.bicep' | ||
|
||
rule: | ||
exclude: | ||
# Ignore these recommendations for this repo. | ||
- Azure.Resource.UseTags | ||
- Azure.ACR.MinSku | ||
- Azure.ACR.ContentTrust | ||
- Azure.Policy.AssignmentAssignedBy |