vpc

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SubnetTypePublic  = "PUBLIC"
	SubnetTypePrivate = "PRIVATE"
	CreatedByTagKey   = "CreatedBy"
	CreatedByTagValue = "vpcctl"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func New

func New(cfg aws.Config) *Client

func (Client) Create

func (v Client) Create(ctx context.Context, opts CreateOptions) (*Details, error)

func (Client) Delete

func (v Client) Delete(ctx context.Context, opts DeleteOptions) (*Details, error)

func (Client) Get

func (v Client) Get(ctx context.Context, opts GetOptions) (*Details, error)

func (Client) List

func (v Client) List(ctx context.Context) ([]string, error)

type CreateOptions

type CreateOptions struct {
	Name    string
	CIDR    string
	Subnets []CreateSubnetOptions
	Tags    map[string]string
}

type CreateSubnetOptions

type CreateSubnetOptions struct {
	AZ     string
	CIDR   string
	Public bool
}

func DefaultSubnets

func DefaultSubnets(region string) []CreateSubnetOptions

DefaultSubnets uses 3 subnets in the region with Private /18 CIDRs (16,382 IPs) Public /20 CIDRs (4,094 IPs)

type DeleteOptions

type DeleteOptions struct {
	Name                   string
	DeleteUnownedResources bool
}

type Details

type Details struct {
	VPC             *types.Vpc
	Subnets         []*types.Subnet
	RouteTables     []*types.RouteTable
	InternetGateway *types.InternetGateway
	NATGateway      *types.NatGateway
}

func (Details) OutputEKSCTL added in v0.0.6

func (d Details) OutputEKSCTL() (string, error)

OutputEKSCTL outputs the vpc configuration yaml block for eksctl

type GetOptions

type GetOptions struct {
	Name string
}

Jump to

Keyboard shortcuts

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