Editing CloudFormation Templates with VSCodeCloudFormation templates. The linter makes useful recommendations and is sorely missing from the AWS console.

--

  1. Install the CloudFormation extension
  2. Install the CloudFormation Linter extension
  3. Complete the installation of the previous extension:

- Terminal/New Terminal
- Run: pip install cfn-lint
- Restart VSCode

4. Press Control-Shift-P (macOS: Command-Shift-P)
5. Select Preferences: Open user settings (JSON)
6. Append the following and save the file

// Custom tags for the parser to use
"yaml.customTags": [
"!And",
"!If",
"!Not",
"!Equals",
"!Or",
"!FindInMap sequence",
"!Base64",
"!Cidr",
"!Ref",
"!Sub",
"!GetAtt",
"!GetAZs",
"!ImportValue",
"!Select",
"!Select sequence",
"!Split",
"!Join sequence"
],
// Enable/disable default YAML formatter (requires restart)
"yaml.format.enable": true

--

--

Terris Linenbach
Terris Linenbach

Written by Terris Linenbach

He/him. Coder since 1980. Always seeking the Best Way. CV: https://terris.com/cv

No responses yet