Skip to content

Commit

Permalink
Add cloud.account.id into add_cloud_metadata for gcp (#21776)
Browse files Browse the repository at this point in the history
  • Loading branch information
kaiyan-sheng committed Oct 15, 2020
1 parent f2e161f commit 325ee32
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,7 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d
- Add istiod metricset. {pull}21519[21519]
- Release `add_cloudfoundry_metadata` as GA. {pull}21525[21525]
- Add support for OpenStack SSL metadata APIs in `add_cloud_metadata`. {pull}21590[21590]
- Add cloud.account.id for GCP into add_cloud_metadata processor. {pull}21776[21776]
- Add proxy metricset for istio module. {pull}21751[21751]

*Auditbeat*
Expand Down
3 changes: 3 additions & 0 deletions libbeat/processors/add_cloud_metadata/provider_google_gce.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ var gceMetadataFetcher = provider{
"project": s.Object{
"id": c.Str("projectId"),
},
"account": s.Object{
"id": c.Str("projectId"),
},
}.ApplyTo(out, project)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,9 @@ func TestRetrieveGCEMetadata(t *testing.T) {

expected := common.MapStr{
"cloud": common.MapStr{
"account": common.MapStr{
"id": "test-dev",
},
"provider": "gcp",
"instance": common.MapStr{
"id": "3910564293633576924",
Expand Down

0 comments on commit 325ee32

Please sign in to comment.