Skip to content

Commit

Permalink
Doc updates #2134 (#2142)
Browse files Browse the repository at this point in the history
  • Loading branch information
BernieWhite authored Apr 7, 2023
1 parent bf3692a commit 2f265e2
Show file tree
Hide file tree
Showing 9 changed files with 102 additions and 90 deletions.
136 changes: 68 additions & 68 deletions .markdownlint.json
Original file line number Diff line number Diff line change
@@ -1,70 +1,70 @@
{
"default": true,
"header-increment": true,
"first-header-h1": {
"level": 1
},
"header-style": {
"style": "atx"
},
"ul-style": {
"style": "dash"
},
"list-indent": true,
"ul-start-left": true,
"ul-indent": {
"indent": 2
},
"no-trailing-spaces": true,
"no-hard-tabs": true,
"no-reversed-links": true,
"no-multiple-blanks": true,
"line-length": {
"line_length": 120,
"code_blocks": false,
"tables": false,
"headers": true
},
"commands-show-output": true,
"no-missing-space-atx": true,
"no-multiple-space-atx": true,
"no-missing-space-closed-atx": true,
"no-multiple-space-closed-atx": true,
"blanks-around-headers": true,
"header-start-left": true,
"no-duplicate-header": true,
"single-h1": {
"front_matter_title": ""
},
"no-trailing-punctuation": {
"punctuation": ".,;:!"
},
"no-multiple-space-blockquote": true,
"no-blanks-blockquote": true,
"ol-prefix": {
"style": "one_or_ordered"
},
"list-marker-space": true,
"blanks-around-fences": true,
"blanks-around-lists": true,
"no-bare-urls": true,
"hr-style": {
"style": "---"
},
"no-emphasis-as-header": true,
"no-space-in-emphasis": true,
"no-space-in-code": true,
"no-space-in-links": true,
"fenced-code-language": true,
"first-line-h1": false,
"no-empty-links": true,
"proper-names": {
"names": [
"PowerShell",
"JavaScript"
],
"code_blocks": false
},
"no-alt-text": true,
"code-block-style": false
"default": true,
"header-increment": true,
"first-header-h1": {
"level": 1
},
"header-style": {
"style": "atx"
},
"ul-style": {
"style": "dash"
},
"list-indent": true,
"ul-start-left": true,
"ul-indent": {
"indent": 2
},
"no-trailing-spaces": true,
"no-hard-tabs": true,
"no-reversed-links": true,
"no-multiple-blanks": true,
"line-length": {
"line_length": 120,
"code_blocks": false,
"tables": false,
"headers": true
},
"commands-show-output": true,
"no-missing-space-atx": true,
"no-multiple-space-atx": true,
"no-missing-space-closed-atx": true,
"no-multiple-space-closed-atx": true,
"blanks-around-headers": true,
"header-start-left": true,
"no-duplicate-header": true,
"single-h1": {
"front_matter_title": ""
},
"no-trailing-punctuation": {
"punctuation": ".,;:!"
},
"no-multiple-space-blockquote": true,
"no-blanks-blockquote": true,
"ol-prefix": {
"style": "one_or_ordered"
},
"list-marker-space": true,
"blanks-around-fences": true,
"blanks-around-lists": true,
"no-bare-urls": true,
"hr-style": {
"style": "---"
},
"no-emphasis-as-header": true,
"no-space-in-emphasis": true,
"no-space-in-code": true,
"no-space-in-links": true,
"fenced-code-language": true,
"first-line-h1": false,
"no-empty-links": true,
"proper-names": {
"names": [
"PowerShell",
"JavaScript"
],
"code_blocks": false
},
"no-alt-text": true,
"code-block-style": false
}
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
"editor.detectIndentation": false,
"files.insertFinalNewline": true,
"yaml.format.singleQuote": true,
"[markdown]": {
"editor.formatOnSave": false
},
"[arm-template]": {
"editor.tabSize": 4,
"editor.defaultFormatter": "msazurermtools.azurerm-vscode-tools"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ jobs:

# STEP 2: Run analysis against exported data
- name: Analyze Azure template files
uses: microsoft/ps-rule@v2.7.0
uses: microsoft/ps-rule@v2.8.0
with:
modules: 'PSRule.Rules.Azure' # Analyze objects using the rules within the PSRule.Rules.Azure PowerShell module.
```
Expand Down
17 changes: 9 additions & 8 deletions docs/creating-your-pipeline.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Within the root directory of your infrastructure as code repository:

# Analyze Azure resources using PSRule for Azure
- name: Analyze Azure template files
uses: microsoft/ps-rule@v2.7.0
uses: microsoft/ps-rule@v2.8.0
with:
modules: 'PSRule.Rules.Azure'
```
Expand Down Expand Up @@ -83,20 +83,21 @@ For a full list of parameters see the readme for [GitHub Actions][6] or [Azure P
### Limiting input to a specific path

By default, PSRule will scan all files and folders within the repository or current working path.
You can use the `inputPath` parameter to limit the analysis to a specific path.
You can use the `inputPath` parameter to limit the analysis to a specific file or directory path.

!!! Tip
The `inputPath` parameter only accepts a relative path.
Both file and directory paths are supported.
For example: `azure/modules/` if you have a `azure/modules/` directory in the root of your repository.
Becareful not to specify a leading `/` such as `/azure/modules/`.
Be careful not to specify a leading `/` such as `/azure/modules/`.
On Linux `/` is the root directory, which makes this a fully qualified path instead of a relative path.

=== "GitHub Actions"

```yaml hl_lines="6"
# Analyze Azure resources using PSRule for Azure
- name: Analyze Azure template files
uses: microsoft/ps-rule@v2.7.0
uses: microsoft/ps-rule@v2.8.0
with:
modules: 'PSRule.Rules.Azure'
inputPath: azure/modules/
Expand Down Expand Up @@ -136,7 +137,7 @@ See [working with baselines][8] for more information.
```yaml hl_lines="6"
# Analyze Azure resources using PSRule for Azure
- name: Analyze Azure template files
uses: microsoft/ps-rule@v2.7.0
uses: microsoft/ps-rule@v2.8.0
with:
modules: 'PSRule.Rules.Azure'
baseline: Azure.GA_2022_12
Expand Down Expand Up @@ -176,7 +177,7 @@ To do this, configure the PSRule for Azure step to _continue on error_.
```yaml hl_lines="4"
# Analyze Azure resources using PSRule for Azure
- name: Analyze Azure template files
uses: microsoft/ps-rule@v2.7.0
uses: microsoft/ps-rule@v2.8.0
continue-on-error: true
with:
modules: 'PSRule.Rules.Azure'
Expand Down Expand Up @@ -215,7 +216,7 @@ You can add additional modules to the `modules` parameter by using comma (`,`) s
```yaml hl_lines="5"
# Analyze Azure resources using PSRule for Azure
- name: Analyze Azure template files
uses: microsoft/ps-rule@v2.7.0
uses: microsoft/ps-rule@v2.8.0
with:
modules: 'PSRule.Rules.Azure,PSRule.Monitor'
```
Expand Down Expand Up @@ -249,7 +250,7 @@ For details on the formats that are supported see [analysis output][9].
```yaml hl_lines="6-7"
# Analyze Azure resources using PSRule for Azure
- name: Analyze Azure template files
uses: microsoft/ps-rule@v2.7.0
uses: microsoft/ps-rule@v2.8.0
with:
modules: 'PSRule.Rules.Azure'
outputFormat: Sarif
Expand Down
7 changes: 3 additions & 4 deletions docs/install-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Install and use PSRule for Azure with GitHub Actions by referencing the `microso

```yaml
- name: Analyze Azure template files
uses: microsoft/ps-rule@v2.7.0
uses: microsoft/ps-rule@v2.8.0
with:
modules: 'PSRule.Rules.Azure'
```
Expand All @@ -35,7 +35,7 @@ Install and use PSRule for Azure with GitHub Actions by referencing the `microso

```yaml
- name: Analyze Azure template files
uses: microsoft/ps-rule@v2.7.0
uses: microsoft/ps-rule@v2.8.0
with:
modules: 'PSRule.Rules.Azure'
prerelease: true
Expand Down Expand Up @@ -232,8 +232,7 @@ If the `./build.ps1` script fails, you can start troubleshooting this by:
- Checking the prerequisites are installed installed (and the specific versions)
- Check the **PowerShell** version enter the following statement in the PowerShell terminal: `$PSVersionTable.PSVersion`
- Check the installed **.NET** version by entering the `dotnet --list-sdks` command in your terminal.
- Check if your .NET setup is connected to any Nuget repositories and if there's any
connectivity or authentication issues.
- Check if your .NET setup is connected to any Nuget repositories and if there's any connectivity or authentication issues.
- Installation of some pre-reqs may require admin privileges.

### Limited access networks
Expand Down
4 changes: 2 additions & 2 deletions docs/setup/setup-azure-monitor-logs.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ Import analysis results into Azure Monitor with GitHub Actions by:

```yaml
- name: Analyze Azure template files
uses: microsoft/ps-rule@v2.7.0
uses: microsoft/ps-rule@v2.8.0
with:
modules: PSRule.Rules.Azure,PSRule.Monitor
conventions: Monitor.LogAnalytics.Import
Expand All @@ -86,7 +86,7 @@ Import analysis results into Azure Monitor with GitHub Actions by:

```yaml
- name: Analyze Azure template files
uses: microsoft/ps-rule@v2.7.0
uses: microsoft/ps-rule@v2.8.0
with:
modules: PSRule.Rules.Azure,PSRule.Monitor
conventions: Monitor.LogAnalytics.Import
Expand Down
2 changes: 1 addition & 1 deletion docs/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -200,5 +200,5 @@ For the PSRule GitHub Action, use **>=1.4.0**.

```yaml
- name: Run PSRule analysis
uses: microsoft/ps-rule@v2.7.0
uses: microsoft/ps-rule@v2.8.0
```
19 changes: 14 additions & 5 deletions docs/using-bicep.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,17 +188,26 @@ Storing modules in a private registry gives you a central location to reference
To test Bicep deployments which uses modules stored in a private registry, these modules must be restored.
The restore process automatically occurs when PSRule is run, however some additional steps are required to authenticate.

To configure authentication to a private registry:
To prepare your registry for storing Bicep modules see [Create private registry for Bicep modules][13].

To configure authentication for PSRule to a private registry:

- [Configure `bicepconfig.json`](#configure-bicepconfigjson)
- [Granting access to a private registry](#granting-access-to-a-private-registry)
- [Set pipeline environment variables](#set-pipeline-environment-variables)

Some organizations may want to expose Bicep modules publically.
This can be configured by enabling anonymous pull access.
To configure your registry see [Make your container registry content publicly available][14].

!!! Note
Currently it is not possible to connect to a private registry without any authentication.
See issue [#2015][10] for details on annoymous access.
To use anonymous pull access to a registry you must use a minimum of Bicep CLI version **0.15.31**.
You can configure PSRule to check for the minimum Bicep version.
See [configuring minimum version][10] for information on how to enable this check.

[10]: https://github.com/Azure/PSRule.Rules.Azure/issues/2015
[13]: https://learn.microsoft.com/azure/azure-resource-manager/bicep/private-module-registry
[14]: https://learn.microsoft.com/azure/container-registry/anonymous-pull-access
[10]: setup/setup-bicep.md#configuring-minimum-version

### Configure `bicepconfig.json`

Expand Down Expand Up @@ -261,7 +270,7 @@ Typically, the following three environment variables should be set:

```yaml
- name: Analyze Azure template files
uses: microsoft/ps-rule@v2.7.0
uses: microsoft/ps-rule@v2.8.0
with:
modules: PSRule.Rules.Azure,PSRule.Monitor
conventions: Monitor.LogAnalytics.Import
Expand Down
2 changes: 1 addition & 1 deletion docs/working-with-baselines.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ See [reference][1] for a list baselines shipped with PSRule for Azure.
```yaml
# Analyze Azure resources using PSRule for Azure
- name: Analyze Azure template files
uses: microsoft/ps-rule@v2.7.0
uses: microsoft/ps-rule@v2.8.0
with:
modules: 'PSRule.Rules.Azure'
baseline: 'Azure.GA_2022_12'
Expand Down

0 comments on commit 2f265e2

Please sign in to comment.