Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Directory ¶
type Directory string
Directory is the path to a Workspace's terraform configuration within a code repository.
type Documentize ¶
type Documentize interface { // AllWorkspaceStatesToDocuments converts all workspace states to documents of non-sensitive strings. AllWorkspaceStatesToDocuments(workspaceToDirectory map[string]string) (map[Workspace][]byte, error) // ConvertWorkspaceDocumentsToJSON converts the output of AllWorkspaceStatesToDocuments to a json-format byte array. ConvertWorkspaceDocumentsToJSON(workspaceDocMap map[Workspace][]byte) ([]byte, error) // ConvertNewResourcesToJSON converts the output of NewResourceDocuments to a json-format byte array. ConvertNewResourcesToJSON(resourceDocMap map[ResourceName]string) ([]byte, error) // IdentifyNewResources determines which resources in the remote cloud environment state files from // terraformer are not present in the workspace state files. Returns a map of new resources to their // corresponding provider. IdentifyNewResources(workspaceToDirectory map[string]string) (map[ResourceData]bool, error) // NewResourceDocuments creates a map between new resources and a document extracted from that // resource definition. NewResourceDocuments(divisionToResource map[ResourceData]bool) (map[ResourceName]string, error) // WorkspaceStateToDocument converts a workspace state to a document of non-sensitive strings. WorkspaceStateToDocument(workspace Workspace) ([]byte, error) }
Documentize interface for making "documents" out of Terraform state files and performing light comparisons between state files
func NewDocumentize ¶
func NewDocumentize(provider terraformValueObjects.Provider) (Documentize, error)
NewDocumentize creates a new instance that implements the Documentize interface.
type ResourceCategory ¶
type ResourceCategory struct {
// contains filtered or unexported fields
}
ResourceCategory is a struct containing information on a resource category
type ResourceData ¶
type ResourceData struct {
// contains filtered or unexported fields
}
ResourceData contains data on a Terraform resource type and the id for that resource
type ResourceExtractor ¶
type ResourceExtractor interface { // ExtractResourceDetails extracts relevant data points from a terraform state resource. ExtractResourceDetails(tfStateParsed *gabs.Container, isAttributesFlat bool, resourceIndex int, instanceIndex int) error // ResourceDetailsToSentence converts resource details to an english sentence format. ResourceDetailsToSentence() string // OutputResourceDetailsSentence coordinates ExtractResourceDetails and ResourceDetailsToSentence in order // to extract and format as a sentence a resource's details from within a state file. OutputResourceDetailsSentence(tfStateParsed *gabs.Container, isAttributesFlat bool, resourceIndex int, instanceIndex int) (string, error) }
ResourceExtractor defines an interface for extracting relevant details from a cloud resource.
func NewAWSResourceExtractor ¶
func NewAWSResourceExtractor() ResourceExtractor
NewAWSResourceExtractor returns an instance of awsResourceExtractor.
func NewAzureResourceExtractor ¶
func NewAzureResourceExtractor() ResourceExtractor
NewAzureResourceExtractor returns an instance of azureResourceExtractor.
func NewGoogleResourceExtractor ¶
func NewGoogleResourceExtractor() ResourceExtractor
NewGoogleResourceExtractor returns an instance of googleResourceExtractor.
type TypeToCategory ¶
type TypeToCategory map[ResourceType]ResourceCategory
TypeToCategory is a map between resource type and resource categorization.