subnets

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: 15 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 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

type Client interface {
	Create(ctx context.Context, input CreateSubnetInput) (CreateSubnetOutput, error)
	Update(ctx context.Context, input UpdateSubnetInput) (UpdateSubnetOutput, error)
	Get(ctx context.Context, input GetSubnetsInput) (GetSubnetsOutput, error)
	Delete(ctx context.Context, input DeleteSubnetsInput) error
	GetEndpointSubnets(ctx context.Context, input GetEndpointSubnetsInput) ([]string, error)
}

func NewClient

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

type CreateSubnetInput

type CreateSubnetInput struct {
	RoleARN          string
	Region           string
	VpcId            string
	CidrBlock        string
	AvailabilityZone string
	Tags             map[string]string
}

type CreateSubnetOutput

type CreateSubnetOutput struct {
	SubnetId         string
	VpcId            string
	CidrBlock        string
	AvailabilityZone string
	State            SubnetState
	Tags             map[string]string
}

type DeleteSubnetsInput

type DeleteSubnetsInput struct {
	RoleARN   string
	Region    string
	SubnetIds []string
}

type GetEndpointSubnetsInput added in v0.2.1

type GetEndpointSubnetsInput struct {
	RoleARN     string
	Region      string
	ClusterName string
}

type GetSubnetOutput

type GetSubnetOutput struct {
	SubnetId              string
	VpcId                 string
	CidrBlock             string
	AvailabilityZone      string
	State                 SubnetState
	RouteTableAssociation RouteTableAssociation
	Tags                  map[string]string
}

type GetSubnetsInput

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

type GetSubnetsOutput

type GetSubnetsOutput []GetSubnetOutput

type ReconcileRequest

type ReconcileRequest struct {
	// Resource that is being reconciled.
	Resource conditions.Setter

	// Spec of the desired subnets.
	Spec Spec
}

ReconcileRequest specified which resource is being reconciled and what is the specification of the desired subnets.

type ReconcileResult

type ReconcileResult struct {
	Subnets []SubnetStatus
}

type Reconciler

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

func NewReconciler

func NewReconciler(client Client) (Reconciler, error)

type RouteTableAssociation

type RouteTableAssociation struct {
	RouteTableId         string
	AssociationStateCode AssociationStateCode
}

type Spec

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

type SubnetSpec

type SubnetSpec struct {
	SubnetId         string
	CidrBlock        string
	AvailabilityZone string
	Tags             map[string]string
}

type SubnetState

type SubnetState string
const (
	SubnetStatePending   SubnetState = "pending"
	SubnetStateAvailable SubnetState = "available"
	SubnetStateUnknown   SubnetState = "unknown"
)

Enum values for SubnetState

type SubnetStatus

type SubnetStatus struct {
	SubnetId              string
	VpcId                 string
	CidrBlock             string
	AvailabilityZone      string
	State                 SubnetState
	RouteTableAssociation RouteTableAssociation
	Tags                  map[string]string
}

type UpdateSubnetInput

type UpdateSubnetInput struct {
	RoleARN      string
	Region       string
	SubnetId     string
	RouteTableId *string
	Tags         map[string]string
}

type UpdateSubnetOutput

type UpdateSubnetOutput struct {
	RouteTableAssociation *RouteTableAssociation
}

Jump to

Keyboard shortcuts

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