Project

terracop

0.0
No commit activity in last 3 years
No release in over 3 years
Automatic Terraform state/plan checking tool. Aims to enforce best practices for Terraform and "the cloud".
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 2.0
~> 11.0
~> 10.0
~> 3.0
~> 0.78
~> 0.10

Runtime

~> 0.8
 Project Readme

Terracop

Terracop is an opinionated HashiCorp Terraform state / plan parser and analyzer. Put it in a CI pipeline to analyze your Terraform plans or run it on already applied states and see what could be improved.

The checks run by Terracop go anywhere from resource names guidelines to identifying security holes in your configuration.

Terracop is massively inspired by Rubocop.

Installation

Terracop installation is pretty standard:

$ gem install terracop

If you'd rather install RuboCop using bundler, don't require it in your Gemfile:

gem 'terracop', require: false

Compatibility

Terracop can work with state and plan files generated by Terraform 0.12.

Usage

You can run terracop from the same directory where you would run terraform and it will automatically pull the state file and analyze it.

If you want to analyze a state file somewhere on your machine you can pass it like this:

$ terracop --state path/to/state/file

Terracop can also parse terraform plan files, in order to report potential issues before you apply the plan and persist the problem. Eg:

$ terraform plan -out tfplan
$ terracop --plan tfplan
$ terraform apply tfplan

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/aomega08/terracop.

Copyright

Copyright (c) 2019-2020 Francesco Boffa. See LICENSE.md for further details.