Documentation ¶
Index ¶
- func Scrape(ctx context.Context) (*types.InventoryReport, error)
- type AWSAssetReference
- type OrgAssets
- type Orgs
- type Repo
- type SourceRepos
- type TFEAssets
- func (c *TFEAssets) AllWorkspacesByOrg(ctx context.Context, orgs map[string]*tfe.Organization) (map[string][]*tfe.Workspace, error)
- func (c *TFEAssets) GetAllManagedAssets(orgWorkspaces map[string][]*tfe.Workspace) (WorkspaceAssets, map[string]OrgAssets, error)
- func (c *TFEAssets) GetAllOrgs(ctx context.Context) (map[string]*tfe.Organization, error)
- func (c *TFEAssets) GetAllWorkspaceStates(ctx context.Context, orgWorkspaces map[string][]*tfe.Workspace) (map[string]OrgAssets, error)
- func (c *TFEAssets) GetAllWorkspaces() (map[string][]*tfe.Workspace, error)
- func (c *TFEAssets) GetWorkspaceState(ctx context.Context, workspace *tfe.Workspace) (WorkspaceAssets, int, error)
- type TFEState
- type WorkspaceAssets
- type Workspaces
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AWSAssetReference ¶
type OrgAssets ¶ added in v0.22.0
type OrgAssets map[string]WorkspaceAssets
type Orgs ¶
type Orgs map[string]Workspaces
type SourceRepos ¶
type TFEAssets ¶
type TFEAssets struct {
// contains filtered or unexported fields
}
func Setup ¶
Expects the following evn vars to be set: TFE_TOKEN=<secret> TFE_ADDRESS=https://<tfe-or-tfc-url>/
func (*TFEAssets) AllWorkspacesByOrg ¶
func (*TFEAssets) GetAllManagedAssets ¶
func (*TFEAssets) GetAllOrgs ¶
func (*TFEAssets) GetAllWorkspaceStates ¶
func (c *TFEAssets) GetAllWorkspaceStates(ctx context.Context, orgWorkspaces map[string][]*tfe.Workspace) (map[string]OrgAssets, error)
Returns a map of maps of maps; top level map is org name, second level map is workspace name, third level map is the resource
func (*TFEAssets) GetAllWorkspaces ¶
func (*TFEAssets) GetWorkspaceState ¶
type TFEState ¶
type TFEState struct { Resources []struct { Module string `json:"module"` Mode string `json:"mode"` Type string `json:"type"` Name string `json:"name"` Provider string `json:"provider"` Instances []struct { Attributes struct { Arn string `json:"arn"` } `json:"attributes"` } `json:"instances"` } `json:"resources"` }
type WorkspaceAssets ¶ added in v0.22.0
type WorkspaceAssets map[string]*AWSAssetReference
type Workspaces ¶
type Workspaces map[string]SourceRepos
Click to show internal directories.
Click to hide internal directories.