Last active
March 24, 2022 19:50
-
-
Save rajrao/06511ed6dcab48933459cf23be528ef9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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": [] | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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)