routetables

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: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AssociationStateCode

type AssociationStateCode string
const (
	AssociationStateCodeAssociating    AssociationStateCode = "associating"
	AssociationStateCodeAssociated     AssociationStateCode = "associated"
	AssociationStateCodeDisassociating AssociationStateCode = "disassociating"
	AssociationStateCodeDisassociated  AssociationStateCode = "disassociated"
	AssociationStateCodeFailed         AssociationStateCode = "failed"
	AssociationStateCodeUnknown        AssociationStateCode = "unknown"
)

Enum values for RouteTableAssociationStateCode

type Client

func NewClient

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

type CreateRouteTableInput

type CreateRouteTableInput struct {
	RoleARN  string
	Region   string
	VpcId    string
	SubnetId string
	Tags     map[string]string
}

type CreateRouteTableOutput

type CreateRouteTableOutput struct {
	RouteTableId         string
	AssociationStateCode AssociationStateCode
}

type DeleteRouteTableInput

type DeleteRouteTableInput struct {
	RoleARN      string
	Region       string
	RouteTableId string
}

type DeleteRouteTablesInput

type DeleteRouteTablesInput struct {
	RoleARN string
	Region  string
	VpcId   string
}

type GetRouteTableInput

type GetRouteTableInput struct {
	RoleARN      string
	Region       string
	RouteTableId string
}

type ListRouteTablesInput

type ListRouteTablesInput struct {
	RoleARN string
	Region  string
	VpcId   string
}

type ListRouteTablesOutput

type ListRouteTablesOutput []RouteTableOutput

type Reconciler

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

func NewReconciler

func NewReconciler(client Client) (Reconciler, error)

type RouteTableAssociation

type RouteTableAssociation struct {
	AssociationId        string
	SubnetId             string
	AssociationStateCode AssociationStateCode
	Main                 bool
}

type RouteTableOutput

type RouteTableOutput struct {
	RouteTableId string

	// AssociationsToSubnets contains all subnets to which the route table is associated to.
	AssociationsToSubnets []RouteTableAssociation

	// OtherAssociations contains IDs of all route table associations to
	// resources other than subnets.
	//
	// These are separated from AssociationsToSubnets because in most cases we care
	// about subnet associations only. Other associations are used less often,
	// during route table deletion for example.
	OtherAssociations []RouteTableAssociation

	// Tags that are currently set on the AWS route table resource.
	Tags map[string]string
}

func (RouteTableOutput) GetAllAssociations added in v0.1.1

func (rto RouteTableOutput) GetAllAssociations() []RouteTableAssociation

GetAllAssociations returns all route table associations (to subnets and other resources).

type Spec

type Spec struct {
	// VpcId is the ID of the VPC for which we want route tables.
	VpcId string

	// Subnets for which we want route tables. We create one route table per
	// subnet.
	Subnets []Subnet
}

type Status

type Status struct {
	RouteTableId          string
	RouteTableAssociation []RouteTableAssociation
}

type Subnet

type Subnet struct {
	Id               string
	AvailabilityZone string
}

type UpdateRouteTableInput

type UpdateRouteTableInput struct {
	RoleARN      string
	Region       string
	RouteTableId string
	Tags         map[string]string
}

Jump to

Keyboard shortcuts

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