File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed
Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ require (
1010 github.com/Azure/go-autorest/autorest/validation v0.3.1 // indirect
1111 github.com/alessio/shellescape v1.4.1 // indirect
1212 github.com/aohorodnyk/uid v1.1.0
13- github.com/aws/aws-sdk-go v1.40.27
13+ github.com/aws/aws-sdk-go v1.40.27 // indirect
1414 github.com/aws/aws-sdk-go-v2 v1.11.0
1515 github.com/aws/aws-sdk-go-v2/config v1.8.3
1616 github.com/aws/aws-sdk-go-v2/service/autoscaling v1.14.0
Original file line number Diff line number Diff line change 11package utils
22
33import (
4+ "errors"
45 "fmt"
5- "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
6- "github.com/sirupsen/logrus"
76 "strings"
87 "time"
8+
9+ "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
10+ "github.com/sirupsen/logrus"
911)
1012
1113var baseTimestamp = time .Now ()
@@ -40,6 +42,10 @@ func (f *tpiFormatter) Format(entry *logrus.Entry) ([]byte, error) {
4042 data [k ] = v
4143 }
4244
45+ if data ["d" ] == nil {
46+ return nil , errors .New ("ResourceData is not available" )
47+ }
48+
4349 d := data ["d" ].(* schema.ResourceData )
4450 message := entry .Message
4551 levelText := strings .ToUpper (entry .Level .String ())
You can’t perform that action at this time.
0 commit comments