VS Code - AWS CloudFormation Auto-Template GeneratorVS Code extension for automatically generating fully-expanded AWS CloudFormation resource templates. FeaturesInsert CloudFormation resourceDisplays a prompt where an AWS resource type can be selected, and then inserts the fully-expanded template into the current text editor. Command Palette > CFN Auto-template: Insert resource Set AWS profileDisplays a prompt where a preferred AWS profile can be selected. The list of profiles are determined by the provided configuration file path. The AWS region will be automatically set if the selected profile definition includes a Command Palette > CFN Auto-template: Set profile Set Template FormatDisplays a prompt where a preferred template format can be selected. The only options supported are Command Palette > CFN Auto-template: Set template format Set Config File PathDisplays a prompt where an absolute path to an AWS configuration file can be provided. This will check that the file exists, parse the file contents, and validate that the file has at least one profile. If all checks pass, it will display a prompt where a preferred AWS profile can be selected. Command Palette > CFN Auto-template: Set config file path Set Resource VisibilityDisplays a prompt where a preferred resource visibility can be selected. The only options supported by AWS are Command Palette > CFN Auto-template: Set resource visibility Set AWS RegionDisplays a prompt where a preferred AWS region can be selected, influencing which endpoint API calls are made against. Note that this will override the Command Palette > CFN Auto-template: Set region Bust CacheBy default, fetching a list of resources (public and private) and individual resources (public and private) are cached, per workspace, for 1 day. This convenience method will clear that cache. This can be especially useful for private CloudFormation types that are being registered and deregistered at-will. Command Palette > CFN Auto-template: Bust cache SettingsAll settings can be modified by going to Preferences > Settings > Extensions > AWS CloudFormation Auto-template Generator ImpetusWhen working with AWS CloudFormation templates, I often find myself referencing the official documentation for a particular resource, which references a nested type, which references a nested type, which references...so on and so forth until reaching the string or boolean value that I'm looking for. This extension helps reduce that friction by automatically expanding the full template for any AWS resource, supporting both JSON and YAML templates. For example, the commonplace
I've personally found the approach of working with a fully expanded template beneficial for learning CloudFormation, because it helps present a complete picture of the resource. Often times I know I need an S3 bucket, but it's unclear what options are available or how other resources might reference each other. Running Locally & Debugging
See vsc-extension-quickstart.md for additional details. TestsSee test/unit for test suite, and Travis CI and Code Climate for coverage. After running tests, an Istanbul coverage report is generated in
Current coverage:
LintingSee .eslintrc.json for configuration options.
To Do |