Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gofireflyio/validiac
ValidIaC combines the best open-source tools to help ensure Infrastructure-as-Code best practices, hygiene & security.
https://github.com/gofireflyio/validiac
Last synced: about 1 month ago
JSON representation
ValidIaC combines the best open-source tools to help ensure Infrastructure-as-Code best practices, hygiene & security.
- Host: GitHub
- URL: https://github.com/gofireflyio/validiac
- Owner: gofireflyio
- License: other
- Fork: true (komodorio/validkube)
- Created: 2022-02-28T10:02:39.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-03-29T14:35:59.000Z (over 1 year ago)
- Last Synced: 2023-11-07T17:23:19.302Z (about 1 year ago)
- Language: TypeScript
- Homepage: https://validiac.com
- Size: 815 KB
- Stars: 209
- Watchers: 1
- Forks: 7
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-tf - validIaC - ValidIaC combines the best open-source tools to help ensure Terraform best practices, hygiene & security. (Tools / Community providers)
README
# validiac
**ValidIaC combines the best open-source tools to help ensure Terraform best
practices, hygiene & security.**## Contents
* [Capabilities](#capabilities)
* [Usage](#usage)
* [CLI Usage](#cli-usage)
* [HTTP Server Usage](#http-server-usage)
* [AWS Lambda Usage](#aws-lambda-usage)
* [Development](#development)
* [Upgrading Dependency Versions](#upgrading-dependency-versions)## Capabilities
- **Lint** - Lint your Terraform HCL files with [tflint](https://github.com/terraform-linters/tflint)
- **Secure** - Scan your Terraform templates for security vulnerabilities with [tfsec](https://github.com/aquasecurity/tfsec)
- **Cost** - Get a breakdown of your cloud costs with [infracost](https://github.com/infracost/infracost)
- **Map** - Chart a map of your cloud infrastructure with [inframap](https://github.com/cycloidio/inframap)ValidIaC is an open-source solution, so please feel free to add more capabilities or tools :)
A free online instance of ValidIaC is available for anyone to use at https://www.validiac.com.
The program can both be deployed as an AWS Lambda function, or be used directly
from the command line.## Usage
The `validiac` binary can be used in three different ways:
1. As a CLI utility.
2. As an HTTP server.
3. As an AWS Lambda handler.To compile the binary:
1. Install [Graphviz](https://graphviz.org/download/#executable-packages) via your package manager.
2. Download static dependencies with `make deps`
3. Build validiac with `make build`### CLI Usage
Run `bin/validiac --help` for complete usage instructions. Example: `bin/validiac --png plan.tf > plan.png`
### HTTP Server Usage
Simply execute `bin/validiac` without any arguments. By default, the server will
listen on all addresses at port 8080. Supply a different port with `--port`.### AWS Lambda Usage
Build the Docker image with `make docker` and deploy to a Lambda environment.
### Use with Docker
As an alternative to installing and running ValidIaC on your system, you may run ValidIaC in a Docker container.
To run:
- :Build Docker (from local directory)
```bash
docker build -t validiac .
```- :Run ValidIaC as CLI, read hcl files from LOCAL_DIRECTORY
```bash
#Help
docker run validiac --help
#Secure
docker run --rm -v :/iac validiac secure /iac/
#Cost
docker run --rm -v :/iac -e INFRACOST_API_KEY="" validiac cost /iac/
#Lint
docker run --rm -v :/iac validiac lint /iac/
#Map (adding --png argument returns it as an image with icons)
docker run --rm -v :/iac validiac map /iac/
#Running ValidIaC as a server listening to port 8080
docker run -p 8080:8080 -e INFRACOST_API_KEY="" validiac
```## Development
- Download static dependencies with `make deps`
- Run unit tests with `make test`
- Run static code analysis with `make lint` (requires [golangci-lint](https://golangci-lint.run/))
- Remove validiac binary with `make clean`
- Remove all binaries (including static dependencies) with `make clean-all`### Upgrading Dependency Versions
The versions used for the four base tools are defined in the [Makefile](Makefile).
Simply change the version number of the relevant tool and rebuild (the validiac
binary will need to be rebuilt as well).