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