Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions pkg/cloud/converters/tags.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package converters

import (
"sort"
"strings"

"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/service/autoscaling"
Expand Down Expand Up @@ -58,12 +59,14 @@ func MapToTags(src infrav1.Tags) []*ec2.Tag {
tags := make([]*ec2.Tag, 0, len(src))

for k, v := range src {
tag := &ec2.Tag{
Key: aws.String(k),
Value: aws.String(v),
}
if !strings.HasPrefix(k, "aws:") {
tag := &ec2.Tag{
Key: aws.String(k),
Value: aws.String(v),
}

tags = append(tags, tag)
tags = append(tags, tag)
}
}

// Sort so that unit tests can expect a stable order
Expand Down
Loading