/cf-plugin

A plugin to help with authoring CloudFormation templates

Primary LanguageTypeScript

Author templates for AWS CloudFormation

This extension help you author AWS CloudFormation templates with ease.

It uses JSON schema validation features of VSCode to validate your template files against a schema for AWS CloudFormation (currently uses cloudformation-jsonschema)

Capabilities

  • Supports authoring of CloudFormation templates in JSON
  • Highlights errors with a helpful error message (in the "Problems" pane, and as a pop-up message visible on hover)
    • Highlights errors when JSON is malformed
    • Highlights errors for required elements, required properties, invalid document structure, etc.
  • Suggests top-level elements (such as Parameters, Resources, etc.)
  • Auto-completes known elements (such as AWSTemplateFormatVersion)
  • Auto-completes structure of elements, intrinsic functions, etc.
  • Suggests supported properties for elements in Parameters, Resources, Outputs, etc.
  • Suggests supported Type information for Parameters and Resources
  • Suggests required and supported properties for each resource (by Type)
  • Suggests intrinsic function names and 'shape'
  • Currently relies upon a JSON schema for CloudFormation as published at cloudformation-jsonschema

Coming soon ...

See TODO and requirements

Illustration

  1. Suggest top-level elements

Top-level elements

  1. Validate that JSON is well-formed

well-formed JSON

  1. Suggest properties for Parameters elements

properties for Parameters elements

  1. Validate required Type for Parameters elements

required Type for Parameters

  1. Suggest Type for Parameters elements

supported values of Type for Parameters element

  1. Validate Type value for Parameters

invalid Type for Parameters element

  1. Suggest properties for Resources elements

properties for Resources element

  1. Suggest Type for Resources elements

supported values of Type for Resources element

  1. Validate required properties for a given resource (by Type)

validate properties for a given Type of Resources element

  1. Suggest properties for a given resource (by Type)

properties for a given Type of Resources element

  1. Suggest intrinsic function names

intrinsic functions

  1. Suggest intrinsic function 'shape'

shape of intrinsic function

Requirements

This extension is active when working with templates with a filename ending in .cf.json

Source

The source for this extension is maintained at Github repository cf-plugin