ec2

package
v2.5.5 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDefaultSecurityGroupManager

func NewDefaultSecurityGroupManager(ec2Client services.EC2, trackingProvider tracking.Provider, taggingManager TaggingManager,
	networkingSGReconciler networking.SecurityGroupReconciler, vpcID string, externalManagedTags []string, logger logr.Logger) *defaultSecurityGroupManager

NewDefaultSecurityGroupManager constructs new defaultSecurityGroupManager.

func NewDefaultTaggingManager

func NewDefaultTaggingManager(ec2Client services.EC2, networkingSGManager networking.SecurityGroupManager, vpcID string, logger logr.Logger) *defaultTaggingManager

NewDefaultTaggingManager constructs new defaultTaggingManager.

func NewSecurityGroupSynthesizer

func NewSecurityGroupSynthesizer(ec2Client services.EC2, trackingProvider tracking.Provider, taggingManager TaggingManager,
	sgManager SecurityGroupManager, vpcID string, logger logr.Logger, stack core.Stack) *securityGroupSynthesizer

NewSecurityGroupSynthesizer constructs new securityGroupSynthesizer.

Types

type ReconcileTagsOption

type ReconcileTagsOption func(opts *ReconcileTagsOptions)

func WithCurrentTags

func WithCurrentTags(tags map[string]string) ReconcileTagsOption

WithCurrentTags is a reconcile option that supplies current tags.

func WithIgnoredTagKeys

func WithIgnoredTagKeys(ignoredTagKeys []string) ReconcileTagsOption

WithIgnoredTagKeys is a reconcile option that configures IgnoredTagKeys.

type ReconcileTagsOptions

type ReconcileTagsOptions struct {
	// CurrentTags on resources.
	// when it's nil, the TaggingManager will try to get the CurrentTags from AWS
	CurrentTags map[string]string

	// IgnoredTagKeys defines the tag keys that should be ignored.
	// these tags shouldn't be altered or deleted.
	IgnoredTagKeys []string
}

options for ReconcileTags API.

func (*ReconcileTagsOptions) ApplyOptions

func (opts *ReconcileTagsOptions) ApplyOptions(options []ReconcileTagsOption)

type SecurityGroupManager

SecurityGroupManager is responsible for create/update/delete SecurityGroup resources.

type TaggingManager

type TaggingManager interface {
	// ReconcileTags will reconcile tags on resources.
	ReconcileTags(ctx context.Context, resID string, desiredTags map[string]string, opts ...ReconcileTagsOption) error

	// ListSecurityGroups returns SecurityGroups that matches any of the tagging requirements.
	ListSecurityGroups(ctx context.Context, tagFilters ...tracking.TagFilter) ([]networking.SecurityGroupInfo, error)
}

abstraction around tagging operations for EC2.

Jump to

Keyboard shortcuts

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