All Projects → hashivim → Vim Terraform

hashivim / Vim Terraform

Licence: isc
basic vim/terraform integration

Projects that are alternatives of or similar to Vim Terraform

Terraform Ls
Terraform Language Server
Stars: ✭ 389 (-41.77%)
Mutual labels:  terraform, hcl
Intro To Terraform
Sample code for the blog post series "A Comprehensive Guide to Terraform."
Stars: ✭ 550 (-17.66%)
Mutual labels:  terraform, hcl
Inframap
Read your tfstate or HCL to generate a graph specific for each provider, showing only the resources that are most important/relevant.
Stars: ✭ 430 (-35.63%)
Mutual labels:  terraform, hcl
Terraform Null Label
Terraform Module to define a consistent naming convention by (namespace, stage, name, [attributes])
Stars: ✭ 324 (-51.5%)
Mutual labels:  terraform, hcl
Tectonic Installer
Install a Kubernetes cluster the CoreOS Tectonic Way: HA, self-hosted, RBAC, etcd Operator, and more
Stars: ✭ 599 (-10.33%)
Mutual labels:  terraform, hcl
Caf Terraform Landingzones
Cloud Adoption Framework for Azure - Terraform landing zones
Stars: ✭ 335 (-49.85%)
Mutual labels:  terraform, hcl
Terraformer
CLI tool to generate terraform files from existing infrastructure (reverse Terraform). Infrastructure to Code
Stars: ✭ 6,316 (+845.51%)
Mutual labels:  terraform, hcl
Elasticsearch Cloud Deploy
Deploy Elasticsearch on the cloud easily
Stars: ✭ 308 (-53.89%)
Mutual labels:  terraform, hcl
Red Baron
Automate creating resilient, disposable, secure and agile infrastructure for Red Teams.
Stars: ✭ 662 (-0.9%)
Mutual labels:  terraform, hcl
K2tf
Kubernetes YAML to Terraform HCL converter
Stars: ✭ 477 (-28.59%)
Mutual labels:  terraform, hcl
Infrastructure As Code Talk
Sample code for the talk "Infrastructure-as-code: running microservices on AWS with Docker, ECS, and Terraform"
Stars: ✭ 520 (-22.16%)
Mutual labels:  terraform, hcl
Bedrock
Automation for Production Kubernetes Clusters with a GitOps Workflow
Stars: ✭ 528 (-20.96%)
Mutual labels:  terraform, hcl
Kubernetes Digitalocean Terraform
📋 🌊 🌎 Setup a simple Kubernetes cluster in Digital Ocean using Terraform
Stars: ✭ 324 (-51.5%)
Mutual labels:  terraform, hcl
Terratag
Terratag is a CLI tool that enables users of Terraform to automatically create and maintain tags across their entire set of AWS, Azure, and GCP resources
Stars: ✭ 385 (-42.37%)
Mutual labels:  terraform, hcl
Kubecdn
Self-hosted CDN based on Kubernetes
Stars: ✭ 314 (-52.99%)
Mutual labels:  terraform, hcl
Vault On Gke
Run @HashiCorp Vault on Google Kubernetes Engine (GKE) with Terraform
Stars: ✭ 453 (-32.19%)
Mutual labels:  terraform, hcl
Terraform Aws Gitlab Runner
Terraform module for AWS GitLab runners on ec2 (spot) instances
Stars: ✭ 292 (-56.29%)
Mutual labels:  terraform, hcl
Terraform Kubestack
Terraform GitOps Framework — Everything you need to build reliable automation for AKS, EKS and GKE Kubernetes clusters in one free and open-source framework.
Stars: ✭ 300 (-55.09%)
Mutual labels:  terraform, hcl
Terragoat
TerraGoat is Bridgecrew's "Vulnerable by Design" Terraform repository. TerraGoat is a learning and training project that demonstrates how common configuration errors can find their way into production cloud environments.
Stars: ✭ 461 (-30.99%)
Mutual labels:  terraform, hcl
Terraform Ecs
AWS ECS terraform module
Stars: ✭ 657 (-1.65%)
Mutual labels:  terraform, hcl

Call For Maintainers

This plugin, along with others like it, is now maintained by the HashiVim organization, which is looking for additional maintainers and contributors. See the HashiVim home page for further information.


Overview: vim-terraform

This plugin adds a :Terraform command that runs terraform, with tab completion of subcommands. It also sets up *.tf, *.tfvars, .terraformrc and terraform.rc files to be highlighted as HCL and *.tfstate as JSON.


Installation

With Vim 8 packages:

git clone https://github.com/hashivim/vim-terraform.git ~/.vim/pack/plugins/start/vim-terraform

With Pathogen:

git clone https://github.com/hashivim/vim-terraform.git ~/.vim/bundle/vim-terraform

With Vundle, add the following to ~/.vimrc:

Plugin 'hashivim/vim-terraform'

Usage

Allow vim-terraform to align settings automatically with Tabularize.

let g:terraform_align=1

Allow vim-terraform to automatically fold (hide until unfolded) sections of terraform code. Defaults to 0 which is off.

let g:terraform_fold_sections=1

Allow vim-terraform to automatically format *.tf and *.tfvars files with terraform fmt. You can also do this manually with the :TerraformFmt command.

let g:terraform_fmt_on_save=1

Allow vim-terraform to use a custom path for the terraform binary. Defaults to terraform (found in $PATH)

let g:terraform_binary_path="/usr/local/Cellar/terraform/0.13.5/bin/terraform"

Use with other HCL files

This is a terraform plugin, with terraform-specific features. However, some users have reported that it also works well for other files that use the Hashicorp Configuration Language.

If you want to use this plugin for non-terraform files, the simplest way is to teach vim to treat them as terraform. For example to use this plugin for files with suffix .hcl, put the following in ~/.vim/ftdetect/terraform.vim:

autocmd BufRead,BufNewFile *.hcl set filetype=terraform

Updating vim-terraform

Note, this is only for maintainers of the vim-terraform project.

When a new version of Terraform drops, you can run the following where x.x.x is a version such as 0.11.11

./update_automagic.sh x.x.x

At this point, add the modified files to a git branch and open a pull request.

git checkout -b "feature/update-to-terraform-$VERSION"
git add $FILE
git commit -m "Message about update"
git push

Add another maintainer to the pull request and await confirmation.


Running tests

To run the test suite and verify functionality

make

Credits

Syntax highlighting and indentation by Kevin Le (@bkad) based on prior work by Larry Gilbert (@L2G). The rest originally written by Mark Cornick https://www.markcornick.com/ and contributors listed below. Licensed under the ISC license.

Thanks to the following contributors:

The :TerraformFmt command is adapted from vim-hclfmt.

This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].