Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrDuplicateAsset = errors.New("duplicate asset")
Functions ¶
This section is empty.
Types ¶
type Asset ¶
type Asset struct { Name string `json:"name"` Type string `json:"asset_type"` Resource *caiasset.AssetResource `json:"resource,omitempty"` IAMPolicy *caiasset.IAMPolicy `json:"iam_policy,omitempty"` OrgPolicy []*caiasset.OrgPolicy `json:"org_policy,omitempty"` V2OrgPolicies []*caiasset.V2OrgPolicies `json:"v2_org_policies,omitempty"` Ancestors []string `json:"ancestors"` // contains filtered or unexported fields }
Asset contains the resource data and metadata in the same format as Google CAI (Cloud Asset Inventory).
type Converter ¶
type Converter struct {
// contains filtered or unexported fields
}
Converter knows how to convert terraform resources to their Google CAI (Cloud Asset Inventory) format (the Asset type).
func NewConverter ¶
func NewConverter(cfg *transport_tpg.Config, ancestryManager ancestrymanager.AncestryManager, offline bool, convertUnchanged bool, errorLogger *zap.Logger) *Converter
NewConverter is a factory function for Converter.
func (*Converter) AddResourceChanges ¶
func (c *Converter) AddResourceChanges(changes []*tfjson.ResourceChange) error
AddResourceChange processes the resource changes in two stages: 1. Process deletions (fetching canonical resources from GCP as necessary) 2. Process creates, updates, and no-ops (fetching canonical resources from GCP as necessary) This will give us a deterministic end result even in cases where for example an IAM Binding and Member conflict with each other, but one is replacing the other.
Directories ¶
Path | Synopsis |
---|---|
----------------------------------------------------------------------------
|
---------------------------------------------------------------------------- |
services/compute
----------------------------------------------------------------------------
|
---------------------------------------------------------------------------- |