Skip to content

Commit fb01541

Browse files
committed
review change - use aws.tags as tag prefix
Signed-off-by: Kavindu Dodanduwa <[email protected]>
1 parent 84863fb commit fb01541

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

libbeat/processors/add_cloud_metadata/docs/add_cloud_metadata.asciidoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,8 @@ Please refer official documentation on https://docs.aws.amazon.com/AWSEC2/latest
106106
[source,json]
107107
-------------------------------------------------------------------------------
108108
{
109-
"ec2": {
110-
"tag": {
109+
"aws": {
110+
"tags": {
111111
"org" : "myOrg",
112112
"owner": "userID"
113113
}

libbeat/processors/add_cloud_metadata/provider_aws_ec2.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ import (
4141
const (
4242
eksClusterNameTagKey = "eks:cluster-name"
4343
tagsCategory = "tags/instance"
44-
tagPrefix = "ec2.tag"
44+
tagPrefix = "aws.tags"
4545
)
4646

4747
type IMDSClient interface {

libbeat/processors/add_cloud_metadata/provider_aws_ec2_test.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -208,8 +208,8 @@ func TestRetrieveAWSMetadataEC2(t *testing.T) {
208208
"id": fmt.Sprintf("arn:aws:eks:%s:%s:cluster/%s", regionDoc1, accountIDDoc1, clusterNameValue),
209209
},
210210
},
211-
"ec2": mapstr.M{
212-
"tag": mapstr.M{
211+
"aws": mapstr.M{
212+
"tags": mapstr.M{
213213
eksClusterNameTagKey: clusterNameValue,
214214
},
215215
},
@@ -247,8 +247,8 @@ func TestRetrieveAWSMetadataEC2(t *testing.T) {
247247
"id": fmt.Sprintf("arn:aws:eks:%s:%s:cluster/%s", regionDoc1, accountIDDoc1, clusterNameValue),
248248
},
249249
},
250-
"ec2": mapstr.M{
251-
"tag": mapstr.M{
250+
"aws": mapstr.M{
251+
"tags": mapstr.M{
252252
eksClusterNameTagKey: clusterNameValue,
253253
},
254254
},
@@ -295,8 +295,8 @@ func TestRetrieveAWSMetadataEC2(t *testing.T) {
295295
"id": fmt.Sprintf("arn:aws:eks:%s:%s:cluster/%s", regionDoc1, accountIDDoc1, clusterNameValue),
296296
},
297297
},
298-
"ec2": mapstr.M{
299-
"tag": mapstr.M{
298+
"aws": mapstr.M{
299+
"tags": mapstr.M{
300300
eksClusterNameTagKey: clusterNameValue,
301301
},
302302
},
@@ -379,8 +379,8 @@ func TestRetrieveAWSMetadataEC2(t *testing.T) {
379379
"id": fmt.Sprintf("arn:aws:eks:%s:%s:cluster/%s", regionDoc1, accountIDDoc1, clusterNameValue),
380380
},
381381
},
382-
"ec2": mapstr.M{
383-
"tag": mapstr.M{
382+
"aws": mapstr.M{
383+
"tags": mapstr.M{
384384
eksClusterNameTagKey: clusterNameValue,
385385
customTagKey: customTagValue,
386386
},

0 commit comments

Comments
 (0)