Autocomplete your CloudFormation Resources in VS Code
Automatically complete CloudFormation resource properties with CloudFormation Snippets in VS Code.
If you use CloudFormation to provision your infrastructure in AWS, it can be time-consuming to constantly visit the AWS documentation in order to find the right property of each resource type. To solve this problem, I created a VS Code extension that adds autocompletion for every available AWS resource type in a CloudFormation template.
The VS Code extension is called CloudFormation Snippets.
The VS Code extension contains the following features:
- Autocompletion for every CloudFormation resource type (including properties).
- Support for Intrinsic functions & Conditions.
- Contains a whole bunch of Parameter types.
Tabto quickly update the property of a CloudFormation resource type.
- The description of every resource type contains a reference to the official documentation.
- Github actions will automatically trigger the pipeline and fetch the latest updates from the official AWS CloudFormation resource specification.
Here is a small demo that shows what happens when you're trying to add a new CloudFormation resource with the VS Code extension enabled:
Steps described in further detail:
- Step 1. Install the extension in your VS Code editor
- Step 2. Create a template file in
.ymlformat to start working on CloudFormation
- Step 3. Make sure that the file type is listed as
YAMLin the VS Code editor (Bottom right-hand corner).
- Step 4. Type
cfnto get the CloudFormation template fragment.
- Step 5. Start adding resources in the resource section of the template by using the prefix name e.g.
autoscaling-autoscalinggroupequals resource type
Note: If the autocomplete doesn't get invoked automatically in step 5. Then you can invoke IntelliSense manually by pressing
ctrl + space. Search for the prefix of the resource type that you want to add and press
More helpful VS Code extensions for CloudFormation
If you're looking to optimize your VS Code with more useful extensions, then have a look at the other article I wrote to help you level up your templating game!
👋 Liked this article? Follow me on Twitter to stay updated!
Interested in reading more such articles from Danny Steenman?
Support the author by donating an amount of your choice.