Skip to content

Commit

Permalink
Merge pull request #1018 from newrelic/servingApmApplicationIDSupport
Browse files Browse the repository at this point in the history
fix(newrelic_entity): include additional ID attr for browser apps
  • Loading branch information
zlesnr authored Nov 11, 2020
2 parents b8ead38 + 04b5410 commit 1e2871e
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion newrelic/data_source_newrelic_entity.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,12 @@ func dataSourceNewRelicEntity() *schema.Resource {
"application_id": {
Type: schema.TypeInt,
Computed: true,
Description: "The domain-specific ID of the entity (only returned for APM and Browser applications)",
Description: "The domain-specific ID of the entity (only returned for APM and Browser applications).",
},
"serving_apm_application_id": {
Type: schema.TypeInt,
Computed: true,
Description: "The browser-specific ID of the backing APM entity. (only returned for Browser applications)",
},
"guid": {
Type: schema.TypeString,
Expand Down Expand Up @@ -149,6 +154,13 @@ func flattenEntityData(e *entities.Entity, d *schema.ResourceData) error {
return err
}

if e.ServingApmApplicationID != nil {
err = d.Set("serving_apm_application_id", *e.ServingApmApplicationID)
if err != nil {
return err
}
}

return nil
}

Expand Down

0 comments on commit 1e2871e

Please sign in to comment.