diff --git a/newrelic/resource_newrelic_key_transaction.go b/newrelic/resource_newrelic_key_transaction.go index a8f539243..dea962d3e 100644 --- a/newrelic/resource_newrelic_key_transaction.go +++ b/newrelic/resource_newrelic_key_transaction.go @@ -82,11 +82,11 @@ func resourceNewRelicKeyTransactionRead(ctx context.Context, d *schema.ResourceD switch (*resp).(type) { case *entities.KeyTransactionEntity: entity := (*resp).(*entities.KeyTransactionEntity) - d.Set("apdex_index", entity.ApdexTarget) - d.Set("application_guid", entity.Application.GUID) - d.Set("browser_apdex_target", entity.BrowserApdexTarget) - d.Set("metric_name", entity.MetricName) - d.Set("name", entity.Name) + _ = d.Set("apdex_index", entity.ApdexTarget) + _ = d.Set("application_guid", entity.Application.GUID) + _ = d.Set("browser_apdex_target", entity.BrowserApdexTarget) + _ = d.Set("metric_name", entity.MetricName) + _ = d.Set("name", entity.Name) default: return diag.FromErr(fmt.Errorf("entity with GUID %s was not a key transaction", guid)) @@ -98,12 +98,12 @@ func resourceNewRelicKeyTransactionRead(ctx context.Context, d *schema.ResourceD func resourceNewRelickeyTransactionCreate(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { client := meta.(*ProviderConfig).NewClient apdexIndex := d.Get("apdex_index").(float64) - applicationGuid := d.Get("application_guid").(string) + applicationGUID := d.Get("application_guid").(string) browserApdexTarget := d.Get("browser_apdex_target").(float64) metricName := d.Get("metric_name").(string) name := d.Get("name").(string) log.Printf("[INFO] Creating New Relic Key Transaction %s", name) - createKeyTransactionResult, err := client.KeyTransaction.KeyTransactionCreate(apdexIndex, keytransaction.EntityGUID(applicationGuid), browserApdexTarget, metricName, name) + createKeyTransactionResult, err := client.KeyTransaction.KeyTransactionCreate(apdexIndex, keytransaction.EntityGUID(applicationGUID), browserApdexTarget, metricName, name) if err != nil { return diag.FromErr(err) } @@ -114,14 +114,14 @@ func resourceNewRelickeyTransactionCreate(ctx context.Context, d *schema.Resourc } d.SetId(string(createKeyTransactionResult.GUID)) - d.Set("apdex_index", createKeyTransactionResult.ApdexTarget) - d.Set("application_guid", createKeyTransactionResult.Application.GUID) - d.Set("browser_apdex_target", createKeyTransactionResult.BrowserApdexTarget) - d.Set("metric_name", createKeyTransactionResult.MetricName) - d.Set("name", createKeyTransactionResult.Name) + _ = d.Set("apdex_index", createKeyTransactionResult.ApdexTarget) + _ = d.Set("application_guid", createKeyTransactionResult.Application.GUID) + _ = d.Set("browser_apdex_target", createKeyTransactionResult.BrowserApdexTarget) + _ = d.Set("metric_name", createKeyTransactionResult.MetricName) + _ = d.Set("name", createKeyTransactionResult.Name) entity := createKeyTransactionResult.Application.Entity.(*keytransaction.ApmApplicationEntityOutline) - d.Set("domain", entity.Domain) - d.Set("type", entity.Type) + _ = d.Set("domain", entity.Domain) + _ = d.Set("type", entity.Type) return nil @@ -142,13 +142,13 @@ func resourceNewRelicKeyTransactionUpdate(ctx context.Context, d *schema.Resourc return diag.FromErr(fmt.Errorf("something went wrong while updating the key transaction")) } - d.Set("apdex_index", updateKeyTransactionResult.ApdexTarget) - d.Set("application_guid", updateKeyTransactionResult.Application.GUID) - d.Set("browser_apdex_target", updateKeyTransactionResult.BrowserApdexTarget) - d.Set("name", updateKeyTransactionResult.Name) + _ = d.Set("apdex_index", updateKeyTransactionResult.ApdexTarget) + _ = d.Set("application_guid", updateKeyTransactionResult.Application.GUID) + _ = d.Set("browser_apdex_target", updateKeyTransactionResult.BrowserApdexTarget) + _ = d.Set("name", updateKeyTransactionResult.Name) entity := updateKeyTransactionResult.Application.Entity.(*keytransaction.ApmApplicationEntityOutline) - d.Set("domain", entity.Domain) - d.Set("type", entity.Type) + _ = d.Set("domain", entity.Domain) + _ = d.Set("type", entity.Type) return nil }