Commit 359416b8 by Erik Sundell Committed by GitHub

Cloudwatch: Fix LaunchTime attribute tag bug (#20237)

* Cast tags of type Time to string

* Fig go lint issue
parent e03d702d
...@@ -550,6 +550,8 @@ func (e *CloudWatchExecutor) handleGetEc2InstanceAttribute(ctx context.Context, ...@@ -550,6 +550,8 @@ func (e *CloudWatchExecutor) handleGetEc2InstanceAttribute(ctx context.Context,
} }
if attr, ok := v.Interface().(*string); ok { if attr, ok := v.Interface().(*string); ok {
data = *attr data = *attr
} else if attr, ok := v.Interface().(*time.Time); ok {
data = (*attr).String()
} else { } else {
return nil, errors.New("invalid attribute path") return nil, errors.New("invalid attribute path")
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment