Skip to content

Instantly share code, notes, and snippets.

@ajkerrigan
Last active April 3, 2023 15:57
Show Gist options
  • Save ajkerrigan/82373bd4948eebed4f7a5005757fed03 to your computer and use it in GitHub Desktop.
Save ajkerrigan/82373bd4948eebed4f7a5005757fed03 to your computer and use it in GitHub Desktop.
c7n-left Snippets for VS Code

c7n-left snippets for VS Code

These are user-defined snippets that can remove some manual typing when writing c7n-left policies.

Usage

  • Add a snippet to your VS Code setup.
  • In a code editor, type the trigger prefix (such as pol) and hit Tab to insert the snippet.
  • Fill in parameterized sections and use the Tab key to move to the next fillable field.
{
"new c7n-left policy": {
"description": "create a new c7n-left policy",
"scope": "yaml",
"prefix": "pol",
"body": [
" - name: ${1:name}",
" resource: terraform.${2:resource}",
" description: |",
" ${3:description}",
" metadata:",
" severity: critical",
" creator: Stacklet",
" filters:",
" - ${4:filters}"
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment