From 4a7d700964261edbbefaa9a6e6d0778bae669aa8 Mon Sep 17 00:00:00 2001 From: Sarah French Date: Fri, 22 Mar 2024 18:36:13 +0100 Subject: [PATCH] Replace use of tflog with log in provider-defined functions --- mmv1/third_party/terraform/functions/element_from_id.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mmv1/third_party/terraform/functions/element_from_id.go b/mmv1/third_party/terraform/functions/element_from_id.go index ec27620936f4..3cd73983c92e 100644 --- a/mmv1/third_party/terraform/functions/element_from_id.go +++ b/mmv1/third_party/terraform/functions/element_from_id.go @@ -3,10 +3,10 @@ package functions import ( "context" "fmt" + "log" "regexp" "github.com/hashicorp/terraform-plugin-framework/function" - "github.com/hashicorp/terraform-plugin-log/tflog" ) // ValidateElementFromIdArguments is reusable validation logic used in provider-defined functions that use the GetElementFromId function @@ -20,7 +20,7 @@ func ValidateElementFromIdArguments(ctx context.Context, input string, regex *re // >1 matches means input usable but not ideal; debug log if len(submatches) > 1 { - tflog.Debug(ctx, fmt.Sprintf("Provider-defined function %s was called with input string: %s. This contains more than one match for the pattern %s. Terraform will use the first found match.", functionName, input, pattern)) + log.Printf("[DEBUG] Provider-defined function %s was called with input string: %s. This contains more than one match for the pattern %s. Terraform will use the first found match.", functionName, input, pattern) } return nil