tfgcv

package
v0.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 21, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package tfgcv pulls together the other packages in this project to take a terraform plan, extract the planned resources in Google CAI format, and run those CAI assets through the Forseti Config Validator.

Index

Constants

This section is empty.

Variables

View Source
var ErrParsingProviderProject = errors.New("unable to parse provider project")

Functions

func BuildVersion

func BuildVersion() string

BuildVersion returns the build version of Terraform Validator.

func ReadPlannedAssets

func ReadPlannedAssets(ctx context.Context, path, project, ancestry string, offline bool) ([]google.Asset, error)

ReadPlannedAssets extracts CAI assets from a terraform plan file. If ancestry path is provided, it assumes the project is in that path rather than fetching the ancestry information using Google API. It ignores non-supported resources.

func ValidateAssets

func ValidateAssets(ctx context.Context, assets []google.Asset, policyRootPath string) (*validator.AuditResponse, error)

ValidateAssets instantiates GCV and audits CAI assets using "policies" and "lib" folder under policyRootPath.

func ValidateAssetsWithLibrary

func ValidateAssetsWithLibrary(ctx context.Context, assets []google.Asset, policyPaths []string, policyLibraryDir string) (*validator.AuditResponse, error)

ValidateAssetsWithLibrary instantiates GCV and audits CAI assets.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL