Validates Terraform Plans using TFSEC and OPA

Terraform Plan Validator

Validates Terraform Plans using TFSEC and OPA

Commands

go run main.go check "delete-rg-test.json" "azure"

Docker

docker build . -t terraform-plan-validator
docker tag terraform-plan-validator bradmccoydev/terraform-plan-validator:latest
docker push bradmccoydev/terraform-plan-validator:latest
docker pull bradmccoydev/terraform-plan-validator:latest

docker run -p 80:80 bradmccoydev/terraform-plan-validator:latest check "delete-rg-test.json" "azure"

variables: OPA_GCP_POLICY: opa-gcp-policy.rego OPA_AZURE_POLICY: opa-azure-policy.rego OPA_AWS_POLICY: opa-aws-policy.rego OPA_REGO_QUERY: data.terraform.analysis.authz

chmod +x ./main ./main check "delete-rg-test.json" "azure"

Owner
Brad McCoy
CNCF Ambassador | Head of Cloud Engineering
Brad McCoy
Similar Resources

Go-path - A helper package that provides utilities for parsing and using ipfs paths

go-path is a helper package that provides utilities for parsing and using ipfs paths

Jan 18, 2022

Perforator is a tool for recording performance metrics over subregions of a program using the Linux "perf" interface.

Perforator Perforator is a tool for recording performance metrics over subregions of a program (e.g., functions) using the Linux "perf" interface.

Dec 15, 2022

rxscan provides functionality to scan text to variables using regular expression capture group.

rxscan rxscan provides functionality to scan text to variables using regular expression capture group. This library is still experimental, use at your

Dec 21, 2020

Visualize your Go data structures using graphviz

memviz How would you rather debug a data structure? "Pretty" printed Visual graph (*test.fib)(0xc04204a5a0)({ index: (int) 5, prev: (*test.fib)(0xc0

Dec 22, 2022

tenv detects environment variable not using t.Setenv

tenv detects environment  variable not using t.Setenv

tenv is analyzer that detects using os.Setenv instead of t.Setenv since Go1.17

Nov 8, 2022

A go library to manipulate keyboards using libevdev

gokbd About This is an elementary library using libevdev to talk to a keyboard on Linux. It allows snooping the keys pressed as well as typing out key

Jan 19, 2022

An Api for Task by Appointy made using go.

AppointyTask API How to Compile Export All the required environment variables. MONGO_URI = Database URI PORT = Port to run the server on DATABA

Oct 10, 2021

Scalable golang ratelimiter using the sliding window algorithm. Currently supports only Redis.

Scalable golang ratelimiter using the sliding window algorithm. Currently supports only Redis.

go-ratelimiter Scalable golang ratelimiter using the sliding window algorithm. Currently supports only Redis. Example usage client := redis.NewClient

Oct 19, 2021

Instagram Backend API Using GO

Instagram Backend API Using GO

InstaCloneGo ⚡ Instagram Backend API Using GO Setup ❄️ go run server.go API END POINTS CREATE USERS :http://localhost:8001/users GET A USER USING ID

Oct 10, 2021
Comments
  • update opa check to pass rego location

    update opa check to pass rego location

    Update OPA Check to pass in parameter of file location instead of the concept of cloud provider this makes it more scalable in the future for multiple teams multiple clouds multiple policies etc

  • add ingress yaml & corresponding fields to values tmpl

    add ingress yaml & corresponding fields to values tmpl

    • Added ingress yaml, with overall deployment controlled by {{ ingress.enabled }}
    • Ingress hostname created as an optional value
    • TLS also made optional, to be tied with ingress hostname
  • Add ingress object for helm chart

    Add ingress object for helm chart

    Add ingress object for helm chart. This should contain params for annotations, TLS, and host and path.

    for example, you should be either able to specify a host and or path. and only one either being host or path.

The Terraform Provider for Factorio

Terraform Provider for Factorio "Infrastructure as Code" for your factory. readme-demo-v-short.mp4 Current Status: Barely functional and mostly useles

Dec 21, 2022
Quickly query a Terraform provider's data type.

Terraform Query Quickly query a Terraform provider's data type. Such as a GitHub repository: ➜ ~ tfq github_repository full_name hashicorp/terraform |

Oct 12, 2021
Pulimi-foo - Terraform Bridge Provider Boilerplate

Terraform Bridge Provider Boilerplate This repository contains boilerplate code

Feb 8, 2022
A tool and library for using structural regular expressions.

Structural Regular Expressions sregx is a package and tool for using structural regular expressions as described by Rob Pike (link).

Dec 7, 2022
This project provides some working examples using Go and Hotwire Turbo.

hotwire-golang-website This project provides some working examples using Go the hotwire/turbo library published by basecamp.

Dec 29, 2022
Bitwise AND on two byte-slices using SIMD instructions

This package provides a vectorised function which performs bitwise AND operation on all pairs of elements in two byte-slices. It detects CPU instruction set and chooses the available best one (AVX512, AVX2, SSE2).

Oct 17, 2022
A program to create assembly 8086 strings to print without using any printing/strings related function but only mov-xchg-int and loops

Assembly String builder tool A program to create assembly 8086 strings to print without using any printing/strings related function but only mov-xchg-

Feb 1, 2022
Create deep copies (clones) of your maps and slices without using reflection.

DeepCopy DeepCopy helps you create deep copies (clones) of your maps and slices. Create deep copies (clones) of your objects The package is based on t

Nov 20, 2022
Calling functions by name and getting outputs by using reflect package.

Invoker A library to call (invoke) functions by taking names and sample inputs of those functions as parameters. And returns the types and values of o

Dec 20, 2021
Access and modify property values in deeply nested maps, using dot-separated paths

Dig lets you access and modify property values in deeply nested, unstructured maps, using dot-separated paths: source := make(map[string]interface{})

May 7, 2022