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 ¶
- Variables
- func BuildVersion() string
- func ReadPlannedAssets(ctx context.Context, path, project, ancestry string, offline bool) ([]google.Asset, error)
- func ValidateAssets(ctx context.Context, assets []google.Asset, policyRootPath string) (*validator.AuditResponse, error)
- func ValidateAssetsWithLibrary(ctx context.Context, assets []google.Asset, policyPaths []string, ...) (*validator.AuditResponse, error)
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.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.