Skip to content

Commit 168f8b8

Browse files
committed
CORS-2892: capi/aws: add user tags to CAPA cluster
1 parent 2cc528d commit 168f8b8

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

pkg/asset/manifests/aws/cluster.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import (
1313

1414
"github.com/openshift/installer/pkg/asset"
1515
"github.com/openshift/installer/pkg/asset/installconfig"
16+
"github.com/openshift/installer/pkg/asset/machines/aws"
1617
"github.com/openshift/installer/pkg/asset/manifests/capiutils"
1718
)
1819

@@ -26,6 +27,11 @@ func GenerateClusterAssets(installConfig *installconfig.InstallConfig, clusterID
2627
return nil, errors.Wrap(err, "failed to get availability zones")
2728
}
2829

30+
tags, err := aws.CapaTagsFromUserTags(clusterID.InfraID, installConfig.Config.AWS.UserTags)
31+
if err != nil {
32+
return nil, fmt.Errorf("failed to get user tags: %w", err)
33+
}
34+
2935
awsCluster := &capa.AWSCluster{
3036
ObjectMeta: metav1.ObjectMeta{
3137
Name: clusterID.InfraID,
@@ -161,6 +167,7 @@ func GenerateClusterAssets(installConfig *installconfig.InstallConfig, clusterID
161167
},
162168
},
163169
},
170+
AdditionalTags: tags,
164171
},
165172
}
166173

0 commit comments

Comments
 (0)