Cloudwatch: Fix LaunchTime attribute tag bug (#20237)
* Cast tags of type Time to string
* Fig go lint issue
(cherry picked from commit 359416b89f)
This commit is contained in:
committed by
Marcus Efraimsson
parent
3477f1e4b2
commit
8e2a725d86
@@ -550,6 +550,8 @@ func (e *CloudWatchExecutor) handleGetEc2InstanceAttribute(ctx context.Context,
|
||||
}
|
||||
if attr, ok := v.Interface().(*string); ok {
|
||||
data = *attr
|
||||
} else if attr, ok := v.Interface().(*time.Time); ok {
|
||||
data = (*attr).String()
|
||||
} else {
|
||||
return nil, errors.New("invalid attribute path")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user