We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e5b01de commit b686ba0Copy full SHA for b686ba0
pkg/cloud/converters/tags.go
@@ -18,6 +18,7 @@ package converters
18
19
import (
20
"sort"
21
+ "strings"
22
23
"github.com/aws/aws-sdk-go/aws"
24
"github.com/aws/aws-sdk-go/service/autoscaling"
@@ -58,12 +59,14 @@ func MapToTags(src infrav1.Tags) []*ec2.Tag {
58
59
tags := make([]*ec2.Tag, 0, len(src))
60
61
for k, v := range src {
- tag := &ec2.Tag{
62
- Key: aws.String(k),
63
- Value: aws.String(v),
64
- }
+ if !strings.HasPrefix(k, "aws:") {
+ tag := &ec2.Tag{
+ Key: aws.String(k),
65
+ Value: aws.String(v),
66
+ }
67
- tags = append(tags, tag)
68
+ tags = append(tags, tag)
69
70
}
71
72
// Sort so that unit tests can expect a stable order
0 commit comments