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:
Erik Sundell
2019-11-25 12:01:36 +01:00
committed by Marcus Efraimsson
parent 3477f1e4b2
commit 8e2a725d86
+2
View File
@@ -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")
}