Cloudwatch: Fix LaunchTime attribute tag bug (#20237)

* Cast tags of type Time to string

* Fig go lint issue
This commit is contained in:
Erik Sundell 2019-11-21 09:20:44 +01:00 committed by GitHub
parent e03d702d0c
commit 359416b89f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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")
}