Skip to content

Commit

Permalink
Add cloud.account.id into add_cloud_metadata for gcp (#21776) (#21868)
Browse files Browse the repository at this point in the history
(cherry picked from commit 325ee32)
  • Loading branch information
kaiyan-sheng authored Oct 19, 2020
1 parent 9ef6bd8 commit f556a8a
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 @@ -530,6 +530,7 @@ field. You can revert this change by configuring tags for the module and omittin
- 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 f556a8a

Please sign in to comment.