vpc

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TagsToMap

func TagsToMap(src []ec2Types.Tag) map[string]string

TagsToMap converts EC2 tags to map[string]string.

Types

type Client

type Client interface {
	Create(ctx context.Context, input CreateVpcInput) (CreateVpcOutput, error)
	Get(ctx context.Context, input GetVpcInput) (GetVpcOutput, error)
	Delete(ctx context.Context, input DeleteVpcInput) error
}

func NewClient

func NewClient(ec2Client *ec2.Client, assumeRoleClient assumerole.Client) (Client, error)

type CreateVpcInput

type CreateVpcInput struct {
	RoleARN            string
	Region             string
	CidrBlock          string
	Tags               map[string]string
	EnableDnsHostnames bool
	EnableDnsSupport   bool
}

type CreateVpcOutput

type CreateVpcOutput struct {
	VpcId     string
	CidrBlock string
	State     VpcState
	Tags      map[string]string
}

type DeleteVpcInput

type DeleteVpcInput struct {
	RoleARN string
	Region  string
	VpcId   string
}

type GetVpcInput

type GetVpcInput struct {
	RoleARN     string
	Region      string
	VpcId       string
	ClusterName string
}

type GetVpcOutput

type GetVpcOutput struct {
	VpcId     string
	CidrBlock string
	State     VpcState
	Tags      map[string]string
}

type Reconciler

type Reconciler interface {
	Reconcile(ctx context.Context, spec Spec) (Status, error)
	ReconcileDelete(ctx context.Context, request aws.ReconcileRequest[aws.DeletedCloudResourceSpec]) error
}

func NewReconciler

func NewReconciler(client Client) (Reconciler, error)

type Spec

type Spec struct {
	ClusterName    string
	RoleARN        string
	Region         string
	VpcId          string
	CidrBlock      string
	AdditionalTags map[string]string
}

type Status

type Status struct {
	VpcId     string
	CidrBlock string
	State     VpcState
	Tags      map[string]string
}

type VpcState

type VpcState string
const (
	VpcStatePending   VpcState = "pending"
	VpcStateAvailable VpcState = "available"
)

Enum values for VpcState

Jump to

Keyboard shortcuts

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