Additional updates to codespaces (#2259)
This commit is contained in:
Родитель
26a0614f94
Коммит
5f5b1ad57e
|
@ -1,6 +1,5 @@
|
||||||
{
|
{
|
||||||
"$schema": "https://raw.githubusercontent.com/devcontainers/spec/main/schemas/devContainer.schema.json",
|
"name": "PSRule for Azure Developer Codespace",
|
||||||
"name": "PSRule for Azure dev",
|
|
||||||
"customizations": {
|
"customizations": {
|
||||||
"vscode": {
|
"vscode": {
|
||||||
"settings": {
|
"settings": {
|
||||||
|
@ -13,15 +12,22 @@
|
||||||
},
|
},
|
||||||
"extensions": [
|
"extensions": [
|
||||||
"ms-dotnettools.csharp",
|
"ms-dotnettools.csharp",
|
||||||
"bewhite.psrule-vscode-preview",
|
|
||||||
"msazurermtools.azurerm-vscode-tools",
|
"msazurermtools.azurerm-vscode-tools",
|
||||||
"ms-azuretools.vscode-bicep"
|
"ms-vscode.powershell",
|
||||||
|
"ms-azuretools.vscode-bicep",
|
||||||
|
"bewhite.psrule-vscode-preview",
|
||||||
|
"GitHub.vscode-pull-request-github",
|
||||||
|
"github.vscode-github-actions"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"features": {
|
"features": {
|
||||||
"github-cli": "latest",
|
"ghcr.io/devcontainers/features/github-cli": {
|
||||||
"powershell": "latest"
|
"version": "latest"
|
||||||
|
},
|
||||||
|
"ghcr.io/devcontainers/features/powershell": {
|
||||||
|
"version": "latest"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"onCreateCommand": "/opt/microsoft/powershell/7/pwsh -f .devcontainer/container-build.ps1",
|
"onCreateCommand": "/opt/microsoft/powershell/7/pwsh -f .devcontainer/container-build.ps1",
|
||||||
"postStartCommand": "/opt/microsoft/powershell/7/pwsh -f .devcontainer/container-start.ps1",
|
"postStartCommand": "/opt/microsoft/powershell/7/pwsh -f .devcontainer/container-start.ps1",
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
{
|
{
|
||||||
"recommendations": [
|
"recommendations": [
|
||||||
"ms-azure-devops.azure-pipelines",
|
"ms-dotnettools.csharp",
|
||||||
"github.vscode-pull-request-github",
|
"ms-azure-devops.azure-pipelines",
|
||||||
"davidanson.vscode-markdownlint",
|
"github.vscode-pull-request-github",
|
||||||
"bewhite.psrule-vscode-preview",
|
"davidanson.vscode-markdownlint",
|
||||||
"streetsidesoftware.code-spell-checker",
|
"streetsidesoftware.code-spell-checker",
|
||||||
"ms-azuretools.vscode-bicep",
|
"ms-azuretools.vscode-bicep",
|
||||||
"msazurermtools.azurerm-vscode-tools",
|
"msazurermtools.azurerm-vscode-tools",
|
||||||
"ms-dotnettools.csharp"
|
"bewhite.psrule-vscode-preview",
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,30 +1,30 @@
|
||||||
{
|
{
|
||||||
// Use IntelliSense to learn about possible attributes.
|
// Use IntelliSense to learn about possible attributes.
|
||||||
// Hover to view descriptions of existing attributes.
|
// Hover to view descriptions of existing attributes.
|
||||||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||||
"version": "0.2.0",
|
"version": "0.2.0",
|
||||||
"configurations": [
|
"configurations": [
|
||||||
{
|
{
|
||||||
"name": "PowerShell: Interactive Session",
|
"name": "PowerShell: Interactive Session",
|
||||||
"type": "PowerShell",
|
"type": "PowerShell",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"cwd": "${workspaceRoot}"
|
"cwd": "${workspaceRoot}"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Debug PSRule.Rules.Azure Cmdlets",
|
"name": "Debug PSRule.Rules.Azure Cmdlets",
|
||||||
"type": "coreclr",
|
"type": "coreclr",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"preLaunchTask": "build",
|
"preLaunchTask": "build",
|
||||||
"program": "pwsh",
|
"program": "pwsh",
|
||||||
"args": [
|
"args": [
|
||||||
"-NoExit",
|
"-NoExit",
|
||||||
"-NoProfile",
|
"-NoProfile",
|
||||||
"-Command",
|
"-Command",
|
||||||
"Import-Module ${workspaceFolder}/out/modules/PSRule.Rules.Azure/PSRule.Rules.Azure.psd1",
|
"Import-Module ${workspaceFolder}/out/modules/PSRule.Rules.Azure/PSRule.Rules.Azure.psd1",
|
||||||
],
|
],
|
||||||
"cwd": "${workspaceFolder}",
|
"cwd": "${workspaceFolder}",
|
||||||
"stopAtEntry": false,
|
"stopAtEntry": false,
|
||||||
"console": "integratedTerminal"
|
"console": "integratedTerminal"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,126 +1,126 @@
|
||||||
{
|
{
|
||||||
"Azure rule documentation": {
|
"Azure rule documentation": {
|
||||||
"scope": "markdown",
|
"scope": "markdown",
|
||||||
"prefix": "rule-azure",
|
"prefix": "rule-azure",
|
||||||
"description": "Azure rule documentation",
|
"description": "Azure rule documentation",
|
||||||
"body": [
|
"body": [
|
||||||
"---",
|
"---",
|
||||||
"reviewed: 2022-mm-dd",
|
"reviewed: 2022-mm-dd",
|
||||||
"severity: ${4:severity}",
|
"severity: ${4:severity}",
|
||||||
"pillar: ${5:pillar}",
|
"pillar: ${5:pillar}",
|
||||||
"category: ${6:category}",
|
"category: ${6:category}",
|
||||||
"resource: ${3:resource}",
|
"resource: ${3:resource}",
|
||||||
"online version: https://azure.github.io/PSRule.Rules.Azure/en/rules/${2:Name}/",
|
"online version: https://azure.github.io/PSRule.Rules.Azure/en/rules/${2:Name}/",
|
||||||
"---",
|
"---",
|
||||||
"",
|
"",
|
||||||
"# ${1:Name of rule}",
|
"# ${1:Name of rule}",
|
||||||
"",
|
"",
|
||||||
"## SYNOPSIS",
|
"## SYNOPSIS",
|
||||||
"",
|
"",
|
||||||
"{{ A brief summary of the rule }}",
|
"{{ A brief summary of the rule }}",
|
||||||
"",
|
"",
|
||||||
"## DESCRIPTION",
|
"## DESCRIPTION",
|
||||||
"",
|
"",
|
||||||
"{{ A detailed description of the rule }}",
|
"{{ A detailed description of the rule }}",
|
||||||
"",
|
"",
|
||||||
"## RECOMMENDATION",
|
"## RECOMMENDATION",
|
||||||
"",
|
"",
|
||||||
"{{ A detailed explanation of the steps required to pass the rule }}",
|
"{{ A detailed explanation of the steps required to pass the rule }}",
|
||||||
"",
|
"",
|
||||||
"## EXAMPLES",
|
"## EXAMPLES",
|
||||||
"",
|
"",
|
||||||
"### Configure with Azure template",
|
"### Configure with Azure template",
|
||||||
"",
|
"",
|
||||||
"To deploy ${3:resource} that pass this rule:",
|
"To deploy ${3:resource} that pass this rule:",
|
||||||
"",
|
"",
|
||||||
"- steps",
|
"- steps",
|
||||||
"",
|
"",
|
||||||
"For example:",
|
"For example:",
|
||||||
"",
|
"",
|
||||||
"```json",
|
"```json",
|
||||||
"",
|
"",
|
||||||
"```",
|
"```",
|
||||||
"",
|
"",
|
||||||
"### Configure with Bicep",
|
"### Configure with Bicep",
|
||||||
"",
|
"",
|
||||||
"To deploy ${3:resource} that pass this rule:",
|
"To deploy ${3:resource} that pass this rule:",
|
||||||
"",
|
"",
|
||||||
"- steps",
|
"- steps",
|
||||||
"",
|
"",
|
||||||
"For example:",
|
"For example:",
|
||||||
"",
|
"",
|
||||||
"```bicep",
|
"```bicep",
|
||||||
"",
|
"",
|
||||||
"```",
|
"```",
|
||||||
"",
|
"",
|
||||||
"## NOTES",
|
"## NOTES",
|
||||||
"",
|
"",
|
||||||
"{{ Additional information or configuration options }}",
|
"{{ Additional information or configuration options }}",
|
||||||
"",
|
"",
|
||||||
"## LINKS",
|
"## LINKS",
|
||||||
"",
|
"",
|
||||||
"{{ Links to external references }}",
|
"{{ Links to external references }}",
|
||||||
""
|
""
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"rule-azure-example-arm": {
|
"rule-azure-example-arm": {
|
||||||
"scope": "markdown",
|
"scope": "markdown",
|
||||||
"prefix": "rule-azure-example-arm",
|
"prefix": "rule-azure-example-arm",
|
||||||
"description": "Example for Azure template",
|
"description": "Example for Azure template",
|
||||||
"body": [
|
"body": [
|
||||||
"### Configure with Azure template",
|
"### Configure with Azure template",
|
||||||
"",
|
"",
|
||||||
"To deploy ${1:resource} that pass this rule:",
|
"To deploy ${1:resource} that pass this rule:",
|
||||||
"",
|
"",
|
||||||
"- ${2:steps}",
|
"- ${2:steps}",
|
||||||
"",
|
"",
|
||||||
"For example:",
|
"For example:",
|
||||||
"",
|
"",
|
||||||
"```json",
|
"```json",
|
||||||
"",
|
"",
|
||||||
"```"
|
"```"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"rule-azure-example-cli": {
|
"rule-azure-example-cli": {
|
||||||
"scope": "markdown",
|
"scope": "markdown",
|
||||||
"prefix": "rule-azure-example-cli",
|
"prefix": "rule-azure-example-cli",
|
||||||
"description": "Example for Azure CLI",
|
"description": "Example for Azure CLI",
|
||||||
"body": [
|
"body": [
|
||||||
"### Configure with Azure CLI",
|
"### Configure with Azure CLI",
|
||||||
"",
|
"",
|
||||||
"```bash",
|
"```bash",
|
||||||
"az ${1:command} -n '<name>' -g '<resource_group>'",
|
"az ${1:command} -n '<name>' -g '<resource_group>'",
|
||||||
"```"
|
"```"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"rule-azure-example-pwsh": {
|
"rule-azure-example-pwsh": {
|
||||||
"scope": "markdown",
|
"scope": "markdown",
|
||||||
"prefix": "rule-azure-example-pwsh",
|
"prefix": "rule-azure-example-pwsh",
|
||||||
"description": "Example for Azure PowerShell",
|
"description": "Example for Azure PowerShell",
|
||||||
"body": [
|
"body": [
|
||||||
"### Configure with Azure PowerShell",
|
"### Configure with Azure PowerShell",
|
||||||
"",
|
"",
|
||||||
"```powershell",
|
"```powershell",
|
||||||
"${1:command} -Name '<name>' -ResourceGroupName '<resource_group>'",
|
"${1:command} -Name '<name>' -ResourceGroupName '<resource_group>'",
|
||||||
"```"
|
"```"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"rule-azure-example-bicep": {
|
"rule-azure-example-bicep": {
|
||||||
"scope": "markdown",
|
"scope": "markdown",
|
||||||
"prefix": "rule-azure-example-bicep",
|
"prefix": "rule-azure-example-bicep",
|
||||||
"description": "Example for Bicep",
|
"description": "Example for Bicep",
|
||||||
"body": [
|
"body": [
|
||||||
"### Configure with Bicep",
|
"### Configure with Bicep",
|
||||||
"",
|
"",
|
||||||
"To deploy ${1:resource} that pass this rule:",
|
"To deploy ${1:resource} that pass this rule:",
|
||||||
"",
|
"",
|
||||||
"- ${2:steps}",
|
"- ${2:steps}",
|
||||||
"",
|
"",
|
||||||
"For example:",
|
"For example:",
|
||||||
"",
|
"",
|
||||||
"```bicep",
|
"```bicep",
|
||||||
"",
|
"",
|
||||||
"```"
|
"```"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
{
|
{
|
||||||
"rule-azure": {
|
"rule-azure": {
|
||||||
"scope": "powershell",
|
"scope": "powershell",
|
||||||
"prefix": "rule-azure",
|
"prefix": "rule-azure",
|
||||||
"description": "Rule definition for Azure",
|
"description": "Rule definition for Azure",
|
||||||
"body": [
|
"body": [
|
||||||
"# Synopsis: ${2}",
|
"# Synopsis: ${2}",
|
||||||
"Rule '${1}' -Type '${3}' -Tag @{ release = ''; ruleSet = ''; } {",
|
"Rule '${1}' -Type '${3}' -Tag @{ release = ''; ruleSet = ''; } {",
|
||||||
"\t$0",
|
"\t$0",
|
||||||
"}"
|
"}"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,23 +1,23 @@
|
||||||
{
|
{
|
||||||
"Azure rule with type": {
|
"Azure rule with type": {
|
||||||
"prefix": "rule-azure-with-type",
|
"prefix": "rule-azure-with-type",
|
||||||
"description": "Rule definition for Azure",
|
"description": "Rule definition for Azure",
|
||||||
"body": [
|
"body": [
|
||||||
"---",
|
"---",
|
||||||
"# Synopsis: ${2}",
|
"# Synopsis: ${2}",
|
||||||
"apiVersion: github.com/microsoft/PSRule/v1",
|
"apiVersion: github.com/microsoft/PSRule/v1",
|
||||||
"kind: Rule",
|
"kind: Rule",
|
||||||
"metadata:",
|
"metadata:",
|
||||||
" name: ${1}",
|
" name: ${1}",
|
||||||
" ref: AZR-000nnn",
|
" ref: AZR-000nnn",
|
||||||
" tags:",
|
" tags:",
|
||||||
" release: 'GA'",
|
" release: 'GA'",
|
||||||
" ruleSet: '${3}'",
|
" ruleSet: '${3}'",
|
||||||
"spec:",
|
"spec:",
|
||||||
" type:",
|
" type:",
|
||||||
" - ${4}",
|
" - ${4}",
|
||||||
" condition:",
|
" condition:",
|
||||||
" ${5}"
|
" ${5}"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче