From 947fbb466e0701de8d2a9b6a55c449c5a1f51fd6 Mon Sep 17 00:00:00 2001 From: Christophe Tafani-Dereeper Date: Wed, 8 Jun 2022 23:46:46 +0200 Subject: [PATCH] Add execution UUID to Terraform user-agent --- pkg/stratus/runner/terraform.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/stratus/runner/terraform.go b/pkg/stratus/runner/terraform.go index c1811540..9f28daf4 100644 --- a/pkg/stratus/runner/terraform.go +++ b/pkg/stratus/runner/terraform.go @@ -3,6 +3,7 @@ package runner import ( "context" "errors" + "github.com/datadog/stratus-red-team/internal/providers" "github.com/datadog/stratus-red-team/internal/utils" "github.com/hashicorp/go-version" "github.com/hashicorp/hc-install/product" @@ -59,7 +60,7 @@ func (m *TerraformManagerImpl) TerraformInitAndApply(directory string) (map[stri return map[string]string{}, errors.New("unable to instantiate Terraform: " + err.Error()) } - err = terraform.SetAppendUserAgent("stratus-red-team") + err = terraform.SetAppendUserAgent(providers.GetStratusUserAgent()) if err != nil { return map[string]string{}, errors.New("unable to configure Terraform: " + err.Error()) }