mirror of
https://github.com/opentffoundation/opentf.git
synced 2025-12-25 01:00:16 -05:00
Update user-agent from go-tfe to opentofu where go-tfe is used (#807)
This commit is contained in:
@@ -28,6 +28,7 @@ import (
|
||||
"github.com/opentofu/opentofu/internal/backend"
|
||||
"github.com/opentofu/opentofu/internal/command/jsonformat"
|
||||
"github.com/opentofu/opentofu/internal/configs/configschema"
|
||||
"github.com/opentofu/opentofu/internal/httpclient"
|
||||
"github.com/opentofu/opentofu/internal/plans"
|
||||
"github.com/opentofu/opentofu/internal/states/statemgr"
|
||||
"github.com/opentofu/opentofu/internal/tfdiags"
|
||||
@@ -307,6 +308,9 @@ func (b *Cloud) Configure(ctx context.Context, obj cty.Value) tfdiags.Diagnostic
|
||||
cfg.Headers.Set(tfversion.Header, tfversion.Version)
|
||||
cfg.Headers.Set(headerSourceKey, headerSourceValue)
|
||||
|
||||
// Update user-agent from 'go-tfe' to opentofu
|
||||
cfg.Headers.Set("User-Agent", httpclient.OpenTofuUserAgent(tfversion.String()))
|
||||
|
||||
// Create the TFC/E API client.
|
||||
b.client, err = tfe.NewClient(cfg)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user