tags

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

Documentation

Index

Constants

View Source
const (
	NameAWSProviderPrefix = "github.com/giantswarm/aws-vpc-operator/"
	NameAWSRole           = NameAWSProviderPrefix + "role"
)

Variables

This section is empty.

Functions

func BuildParamsToTagSpecification

func BuildParamsToTagSpecification(ec2ResourceType ec2Types.ResourceType, tags map[string]string) ec2Types.TagSpecification

BuildParamsToTagSpecification builds a TagSpecification for the specified resource type.

func Diff

func Diff(t1 map[string]string, t2 map[string]string) map[string]string

Diff returns a map with key-value pairs exist in t1, but do not exist in t2.

func ToMap

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

ToMap converts EC2 tags to map[string]string.

Types

type BuildParams

type BuildParams struct {
	// ClusterName is the cluster associated with the resource.
	ClusterName string

	// ResourceID is the unique identifier of the resource to be tagged.
	ResourceID string

	// Name is the name of the resource, it's applied as the tag "Name" on AWS.
	Name string

	// Role is the role associated to the resource.
	Role string

	// Any additional tags to be added to the resource.
	Additional map[string]string
}

BuildParams is used to build tags around an aws resource.

Copied from sigs.k8s.io/cluster-api-provider-aws.

func (BuildParams) Build

func (p BuildParams) Build() map[string]string

Build builds tags including the cluster tag and returns them in map form.

Copied from sigs.k8s.io/cluster-api-provider-aws.

type Client

type Client interface {
	Create(ctx context.Context, input CreateTagsInput) error
}

func NewClient

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

type CreateTagsInput

type CreateTagsInput struct {
	RoleARN    string
	Region     string
	ResourceId string
	Tags       map[string]string
}

Jump to

Keyboard shortcuts

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