markdowncreation

package
v0.0.0-...-d123b64 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 4, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const OutputPath = "state_of_cloud"

OutputPath is the path where the markdown file will be created

Variables

This section is empty.

Functions

This section is empty.

Types

type ActorActionCount

type ActorActionCount struct {
	Actor  CloudActor
	Action CloudAction
	Count  int
}

ActorActionCount represents the count of an actor action

type CloudAction

type CloudAction string

CloudAction represents a cloud action (modified, creation)

type CloudActionDetail

type CloudActionDetail struct {
	Actor     string `json:"actor"`
	Timestamp string `json:"timestamp"`
}

CloudActionDetail represents the details of a cloud action

type CloudActor

type CloudActor string

CloudActor represents a cloud actor name

type CostEstimate

type CostEstimate struct {
	CostComponent   string `json:"cost_component"`
	IsUsageBased    bool   `json:"is_usage_based"`
	MonthlyCost     string `json:"monthly_cost"`
	MonthlyQuantity string `json:"monthly_quantity"`
	Price           string `json:"price"`
	ResourceName    string `json:"resource_name"`
	SubResourceName string `json:"sub_resource_name"`
	Unit            string `json:"unit"`
}

CostEstimate represents a cost estimate for a resource

type DeletedResource

type DeletedResource struct {
	InstanceID    string `json:"InstanceID"`
	StateFileName string `json:"StateFileName"`
	ModuleName    string `json:"ModuleName"`
	ResourceType  string `json:"ResourceType"`
	ResourceName  string `json:"ResourceName"`
}

DeletedResource represents a resource that was deleted

type InstanceDriftedResources

type InstanceDriftedResources map[InstanceID][]ManagedDriftResource

InstanceDriftedResources represents a map of instance id to a list of drifted resources

type InstanceID

type InstanceID string

InstanceID represents an instance id from a resource

type ManagedDriftResource

type ManagedDriftResource struct {
	RecentActor           string `json:"RecentActor"`
	RecentActionTimestamp string `json:"RecentActionTimestamp"`
	AttributeName         string `json:"AttributeName"`
	TerraformValue        string `json:"TerraformValue"`
	CloudValue            string `json:"CloudValue"`
	InstanceID            string `json:"InstanceID"`
	InstanceRegion        string `json:"InstanceRegion"`
	StateFileName         string `json:"StateFileName"`
	ModuleName            string `json:"ModuleName"`
	ResourceType          string `json:"ResourceType"`
	ResourceName          string `json:"ResourceName"`
}

ManagedDriftResource represents a resource that is managed by terraform but has drifted

type MarkdownCreator

type MarkdownCreator struct {
	// contains filtered or unexported fields
}

MarkdownCreator is responsible for creating the markdown file with the data from the state of cloud

func NewMarkdownCreator

func NewMarkdownCreator() *MarkdownCreator

NewMarkdownCreator returns a new MarkdownCreator

func (*MarkdownCreator) CreateMarkdownFile

func (m *MarkdownCreator) CreateMarkdownFile(jobName string) error

CreateMarkdownFile creates a markdown file with the data from the state of cloud

type ResourceCostEstimate

type ResourceCostEstimate struct {
	ResourceCount  int
	CostComponents map[string]bool
	IsUsageBased   bool
	MonthlyCost    float64
}

ResourceCostEstimate represents the cost estimate for a resource

type ResourcePath

type ResourcePath string

ResourcePath represents a resource path

type ResourcePathDriftedResources

type ResourcePathDriftedResources map[ResourcePath]InstanceDriftedResources

ResourcePathDriftedResources represents a map of resource path to a list of drifted resources

type SecurityRisk

type SecurityRisk struct {
	ID              string   `json:"id"`
	RuleDescription string   `json:"rule_description"`
	Severity        string   `json:"severity"`
	Resolution      string   `json:"resolution"`
	Links           []string `json:"links"`
}

SecurityRisk represents a security risk identified by tfsec

type StateFileDriftedResources

type StateFileDriftedResources map[StateFileName]ResourcePathDriftedResources

StateFileDriftedResources represents a map of state file name to a list of drifted resources

type StateFileName

type StateFileName string

StateFileName represents a state file name

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL