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 (
10
10
github.com/Azure/go-autorest/autorest/validation v0.3.1 // indirect
11
11
github.com/alessio/shellescape v1.4.1 // indirect
12
12
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
14
14
github.com/aws/aws-sdk-go-v2 v1.11.0
15
15
github.com/aws/aws-sdk-go-v2/config v1.8.3
16
16
github.com/aws/aws-sdk-go-v2/service/autoscaling v1.14.0
Original file line number Diff line number Diff line change 1
1
package utils
2
2
3
3
import (
4
+ "errors"
4
5
"fmt"
5
- "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
6
- "github.com/sirupsen/logrus"
7
6
"strings"
8
7
"time"
8
+
9
+ "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
10
+ "github.com/sirupsen/logrus"
9
11
)
10
12
11
13
var baseTimestamp = time .Now ()
@@ -40,6 +42,10 @@ func (f *tpiFormatter) Format(entry *logrus.Entry) ([]byte, error) {
40
42
data [k ] = v
41
43
}
42
44
45
+ if data ["d" ] == nil {
46
+ return nil , errors .New ("ResourceData is not available" )
47
+ }
48
+
43
49
d := data ["d" ].(* schema.ResourceData )
44
50
message := entry .Message
45
51
levelText := strings .ToUpper (entry .Level .String ())
You can’t perform that action at this time.
0 commit comments