Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rajrao/06511ed6dcab48933459cf23be528ef9 to your computer and use it in GitHub Desktop.
Save rajrao/06511ed6dcab48933459cf23be528ef9 to your computer and use it in GitHub Desktop.
//validates a cloud formation template in VsCode.
//add this to a file named tasks.json in the .vscode folder.
//to run: Terminal >> Run Task...
{
"version": "2.0.0",
"tasks":[
{
"label":"aws cf validate-template",
"type":"shell",
"presentation": {
"reveal": "always",
"panel": "shared"
},
"command": "aws",
"args": [
"cloudformation",
"validate-template",
"--template-body",
"file://${file}"
],
"problemMatcher": []
}
]
}
@rajrao
Copy link
Author

rajrao commented Mar 24, 2022

Save the above file as tasks.json in .vscode folder. It will provide you the option to run it as a task from "Terminal".
Also, if you install the following extenstion: vscode-cfn-lint, it will auto lint your CF template: https://marketplace.visualstudio.com/items?itemName=kddejong.vscode-cfn-lint (its awesome)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment