ec2

package
v0.0.0-...-52cdb32 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2023 License: MIT Imports: 2 Imported by: 0

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

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

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

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

func (*LaunchConfiguration) HasHTTPEndpointDisabled

func (i *LaunchConfiguration) HasHTTPEndpointDisabled() bool

func (*LaunchConfiguration) RequiresIMDSToken

func (i *LaunchConfiguration) RequiresIMDSToken() bool

type LaunchTemplate

type LaunchTemplate struct {
	Metadata defsecTypes.Metadata
	Instance
}

type MetadataOptions

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

type NetworkACL

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

type NetworkACLRule

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

type SecurityGroup

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

type SecurityGroupRule

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

type Subnet

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

type VPC

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

type Volume

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