ec2

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2023 License: MIT Imports: 2 Imported by: 1

Documentation

Index

Constants

View Source
const (
	TypeIngress = "ingress"
	TypeEgress  = "egress"
)
View Source
const (
	ActionAllow = "allow"
	ActionDeny  = "deny"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockDevice

type BlockDevice struct {
	Metadata  defsecTypes.Metadata
	Encrypted defsecTypes.BoolValue
}

type EC2

type EC2 struct {
	Instances            []Instance
	LaunchConfigurations []LaunchConfiguration
	LaunchTemplates      []LaunchTemplate
	VPCs                 []VPC
	SecurityGroups       []SecurityGroup
	NetworkACLs          []NetworkACL
	Subnets              []Subnet
	Volumes              []Volume
}

type Encryption added in v0.0.2

type Encryption struct {
	Metadata defsecTypes.Metadata
	Enabled  defsecTypes.BoolValue
	KMSKeyID defsecTypes.StringValue
}

type Instance

type Instance struct {
	Metadata        defsecTypes.Metadata
	MetadataOptions MetadataOptions
	UserData        defsecTypes.StringValue
	SecurityGroups  []SecurityGroup
	RootBlockDevice *BlockDevice
	EBSBlockDevices []*BlockDevice
}

func NewInstance added in v0.0.2

func NewInstance(metadata defsecTypes.Metadata) *Instance

func (*Instance) HasHTTPEndpointDisabled

func (i *Instance) HasHTTPEndpointDisabled() bool

func (*Instance) HasSensitiveInformationInUserData

func (i *Instance) HasSensitiveInformationInUserData() bool

func (*Instance) RequiresIMDSToken

func (i *Instance) RequiresIMDSToken() bool

type LaunchConfiguration added in v0.0.2

type LaunchConfiguration struct {
	Metadata          defsecTypes.Metadata
	Name              defsecTypes.StringValue
	AssociatePublicIP defsecTypes.BoolValue
	RootBlockDevice   *BlockDevice
	EBSBlockDevices   []*BlockDevice
	MetadataOptions   MetadataOptions
	UserData          defsecTypes.StringValue
}

func (*LaunchConfiguration) HasHTTPEndpointDisabled added in v0.0.2

func (i *LaunchConfiguration) HasHTTPEndpointDisabled() bool

func (*LaunchConfiguration) RequiresIMDSToken added in v0.0.2

func (i *LaunchConfiguration) RequiresIMDSToken() bool

type LaunchTemplate added in v0.0.2

type LaunchTemplate struct {
	Metadata defsecTypes.Metadata
	Instance
}

type MetadataOptions

type MetadataOptions struct {
	Metadata     defsecTypes.Metadata
	HttpTokens   defsecTypes.StringValue
	HttpEndpoint defsecTypes.StringValue
}

type NetworkACL added in v0.0.2

type NetworkACL struct {
	Metadata      defsecTypes.Metadata
	Rules         []NetworkACLRule
	IsDefaultRule defsecTypes.BoolValue
}

type NetworkACLRule added in v0.0.2

type NetworkACLRule struct {
	Metadata defsecTypes.Metadata
	Type     defsecTypes.StringValue
	Action   defsecTypes.StringValue
	Protocol defsecTypes.StringValue
	CIDRs    []defsecTypes.StringValue
}

type SecurityGroup added in v0.0.2

type SecurityGroup struct {
	Metadata     defsecTypes.Metadata
	IsDefault    defsecTypes.BoolValue
	Description  defsecTypes.StringValue
	IngressRules []SecurityGroupRule
	EgressRules  []SecurityGroupRule
	VPCID        defsecTypes.StringValue
}

type SecurityGroupRule added in v0.0.2

type SecurityGroupRule struct {
	Metadata    defsecTypes.Metadata
	Description defsecTypes.StringValue
	CIDRs       []defsecTypes.StringValue
}

type Subnet added in v0.0.2

type Subnet struct {
	Metadata            defsecTypes.Metadata
	MapPublicIpOnLaunch defsecTypes.BoolValue
}

type VPC added in v0.0.2

type VPC struct {
	Metadata        defsecTypes.Metadata
	ID              defsecTypes.StringValue
	IsDefault       defsecTypes.BoolValue
	SecurityGroups  []SecurityGroup
	FlowLogsEnabled defsecTypes.BoolValue
}

type Volume added in v0.0.2

type Volume struct {
	Metadata   defsecTypes.Metadata
	Encryption Encryption
}

Jump to

Keyboard shortcuts

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