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 Config Validator.
Index ¶
- func ReadPlannedAssets(ctx context.Context, path, project, zone, region string, ...) ([]google.Asset, error)
- func ValidateAssets(ctx context.Context, assets []google.Asset, policyRootPath string) ([]*validator.Violation, error)
- func ValidateAssetsWithLibrary(ctx context.Context, assets []google.Asset, policyPaths []string, ...) ([]*validator.Violation, error)
- type ReadPlannedAssetsFunc
- type ValidateAssetsFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReadPlannedAssets ¶
func ReadPlannedAssets(ctx context.Context, path, project, zone, region string, ancestry map[string]string, offline, convertUnchanged bool, errorLogger *zap.Logger, userAgent string) ([]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. If convertUnchanged is set then resources that do not have any change from their deployed state are also reported in the output, otherwise only resources that are going to be changed are reported. It ignores non-supported resources.
Types ¶
type ReadPlannedAssetsFunc ¶ added in v0.8.0
Click to show internal directories.
Click to hide internal directories.