config

package
v0.29.0 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2023 License: MIT Imports: 4 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ShouldInclude added in v0.1.26

func ShouldInclude(name string, includeREs []Expression, excludeREs []Expression) bool

ShouldInclude - Checks if a resource's name should be included according to the inclusion and exclusion rules

Types

type Config

type Config struct {
	S3                    ResourceType `yaml:"s3"`
	IAMUsers              ResourceType `yaml:"IAMUsers"`
	IAMGroups             ResourceType `yaml:"IAMGroups"`
	IAMPolicies           ResourceType `yaml:"IAMPolicies"`
	IAMServiceLinkedRoles ResourceType `yaml:"IAMServiceLinkedRoles"`
	IAMRoles              ResourceType `yaml:"IAMRoles"`
	SecretsManagerSecrets ResourceType `yaml:"SecretsManager"`
	NatGateway            ResourceType `yaml:"NatGateway"`
	AccessAnalyzer        ResourceType `yaml:"AccessAnalyzer"`
	CloudWatchDashboard   ResourceType `yaml:"CloudWatchDashboard"`
	OpenSearchDomain      ResourceType `yaml:"OpenSearchDomain"`
	DynamoDB              ResourceType `yaml:"DynamoDB"`
	EBSVolume             ResourceType `yaml:"EBSVolume"`
	LambdaFunction        ResourceType `yaml:"LambdaFunction"`
	ELBv2                 ResourceType `yaml:"ELBv2"`
	ECSService            ResourceType `yaml:"ECSService"`
	ECSCluster            ResourceType `yaml:"ECSCluster"`
	Elasticache           ResourceType `yaml:"Elasticache"`
	VPC                   ResourceType `yaml:"VPC"`
	OIDCProvider          ResourceType `yaml:"OIDCProvider"`
	AutoScalingGroup      ResourceType `yaml:"AutoScalingGroup"`
	LaunchConfiguration   ResourceType `yaml:"LaunchConfiguration"`
	ElasticIP             ResourceType `yaml:"ElasticIP"`
	EC2                   ResourceType `yaml:"EC2"`
	EC2KeyPairs           ResourceType `yaml:"EC2KeyPairs"`
	EC2DedicatedHosts     ResourceType `yaml:"EC2DedicatedHosts"`
	CloudWatchLogGroup    ResourceType `yaml:"CloudWatchLogGroup"`
	KMSCustomerKeys       ResourceType `yaml:"KMSCustomerKeys"`
	EKSCluster            ResourceType `yaml:"EKSCluster"`
	SageMakerNotebook     ResourceType `yaml:"SageMakerNotebook"`
	KinesisStream         ResourceType `yaml:"KinesisStream"`
	APIGateway            ResourceType `yaml:"APIGateway"`
	APIGatewayV2          ResourceType `yaml:"APIGatewayV2"`
	ElasticFileSystem     ResourceType `yaml:"ElasticFileSystem"`
	CloudtrailTrail       ResourceType `yaml:"CloudtrailTrail"`
	ECRRepository         ResourceType `yaml:"ECRRepository"`
	DBInstances           ResourceType `yaml:"DBInstances"`
	LaunchTemplate        ResourceType `yaml:"LaunchTemplate"`
	ConfigServiceRule     ResourceType `yaml:"ConfigServiceRule"`
	ConfigServiceRecorder ResourceType `yaml:"ConfigServiceRecorder"`
	CloudWatchAlarm       ResourceType `yaml:"CloudWatchAlarm"`
}

Config - the config object we pass around

func GetConfig

func GetConfig(filePath string) (*Config, error)

GetConfig - Unmarshall the config file and parse it into a config object.

type Expression added in v0.1.26

type Expression struct {
	RE regexp.Regexp
}

func (*Expression) UnmarshalText added in v0.1.26

func (expression *Expression) UnmarshalText(data []byte) error

UnmarshalText - Internally used by yaml.Unmarshal to unmarshall an Expression field

type FilterRule

type FilterRule struct {
	NamesRegExp []Expression `yaml:"names_regex"`
}

type ResourceType

type ResourceType struct {
	IncludeRule FilterRule `yaml:"include"`
	ExcludeRule FilterRule `yaml:"exclude"`
}

Jump to

Keyboard shortcuts

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