From 2ed3a2d34ecb885e06fc4bade5cb595ab078708a Mon Sep 17 00:00:00 2001 From: texasich <101962694+texasich@users.noreply.github.com> Date: Thu, 4 Jun 2026 19:33:16 -0500 Subject: [PATCH] refactor: migrate resource_github_actions_environment_variable to tflog Replace Go standard `log` package with HashiCorp structured `tflog` for consistent logging across the provider. Changes: - Replace `log` import with tflog import - Convert `log.Printf` to `tflog.Info` with structured fields Part of #3070 Closes #3325 Signed-off-by: texasich <101962694+texasich@users.noreply.github.com> --- github/resource_github_actions_environment_variable.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/github/resource_github_actions_environment_variable.go b/github/resource_github_actions_environment_variable.go index ec72cd18e6..c31cc55e32 100644 --- a/github/resource_github_actions_environment_variable.go +++ b/github/resource_github_actions_environment_variable.go @@ -3,11 +3,11 @@ package github import ( "context" "errors" - "log" "net/http" "net/url" "github.com/google/go-github/v88/github" + "github.com/hashicorp/terraform-plugin-log/tflog" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -140,7 +140,9 @@ func resourceGithubActionsEnvironmentVariableRead(ctx context.Context, d *schema var ghErr *github.ErrorResponse if errors.As(err, &ghErr) { if ghErr.Response.StatusCode == http.StatusNotFound { - log.Printf("[INFO] Removing actions variable %s from state because it no longer exists in GitHub", d.Id()) + tflog.Info(ctx, "Removing actions variable from state because it no longer exists in GitHub", map[string]any{ + "variable_id": d.Id(), + }) d.SetId("") return nil }