Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/run-at-scale/vscode-terraform-doc-snippets

Snippets in vscode for all resources and data sources, as yanked directly from provider docs.
https://github.com/run-at-scale/vscode-terraform-doc-snippets

docs-as-code snippets terraform visual-studio-code visual-studio-code-extension vscode

Last synced: 2 months ago
JSON representation

Snippets in vscode for all resources and data sources, as yanked directly from provider docs.

Awesome Lists containing this project

README

        

# vscode-terraform-doc-snippets

[![Version](https://vsmarketplacebadge.apphb.com/version/run-at-scale.terraform-doc-snippets.svg)](https://vsmarketplacebadge.apphb.com/version-short/run-at-scale.terraform-doc-snippets.svg)
[![Install](https://vsmarketplacebadge.apphb.com/installs/run-at-scale.terraform-doc-snippets.svg)](https://vsmarketplacebadge.apphb.com/installs-short/run-at-scale.terraform-doc-snippets.svg)
[![Ratings](https://vsmarketplacebadge.apphb.com/rating-short/run-at-scale.terraform-doc-snippets.svg)](https://vsmarketplacebadge.apphb.com/rating-short/run-at-scale.terraform-doc-snippets.svg)

![Terraform](https://github.com/run-at-scale/vscode-terraform-doc-snippets/raw/master/assets/terraform_logo.png "Terraform doc snippets")

A vscode extension that yanks resource and data source documentation from Terraform provider repos and transforms them into structured VS Code snippets. Over 9000 snippets included.

## Demo

![Demo](https://raw.githubusercontent.com/run-at-scale/vscode-terraform-doc-snippets/master/assets/demo.gif)

## Motivation

The existing Terraform snippet extensions offer a set of user-defined snippets. Some of them are good but many
lack the context to really be useful and only about 1/3 of the resources and data sources in the public providers
are covered. Terraform documentation is largely good and continues to evolve alongside the providers so it makes sense
to build a snippet extension that pulls snippets directly from documentation code examples. This makes for a scalable
way to continuously provide up to date resource and data source snippets. The examples in documentation often give
excellent context which is important for understanding how infrastructure primitives fit together.

## Getting started

The following commands are used to build the snippets file:

```bash
nvm use lts/dubnium
npm install ---dev
npm run build:snippets
```

## Features

- All resources and data source snippets gathered from documentation. As docs improve, so do the snippets.
- All snippets are delivered as a pre-compiled bundle - no dynamic lookups so your editor stays speedy.
- Resource and data source name collisions avoided by including `data` or `resource` in each snippet prefix.
- All providers listed in the terraform-providers organization are covered.
- Ability to override or add additional snippets through configuration.

## Known Issues

- Issue #1 is probably that this is my first node project and I'm not to be trusted with the language. Help and review wanted! Tests needed.

## Contributing

Report issues/questions/feature requests on in the [issues](https://github.com/run-at-scale/vscode-terraform-doc-snippets/issues/new) section.

Full contributing [guidelines are covered here](https://github.com/run-at-scale/vscode-terraform-doc-snippets/blob/master/CONTRIBUTING.md).

## Changelog

The [changelog](https://github.com/run-at-scale/vscode-terraform-doc-snippets/blob/master/CHANGELOG.md) captures all important release notes.

## Authors

Created and maintained by [Brandon Bjelland](https://github.com/brandonjbjelland) - [email protected].

## License

MIT Licensed. See [LICENSE](https://github.com/run-at-scale/vscode-terraform-doc-snippets/blob/master/LICENSE) for full details.