Skip to content

Commit 91ab562

Browse files
authored
Merge pull request ekristen#175 from ekristen/rebuy-1222
fix: add CreateTime property to EC2NATGateway and EC2Volume resources
2 parents 5449ac5 + af0bf1f commit 91ab562

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

resources/ec2-nat-gateways.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package resources
33
import (
44
"context"
55
"fmt"
6+
"time"
67

78
"github.com/gotidy/ptr"
89

@@ -79,6 +80,7 @@ func (n *EC2NATGateway) Remove(_ context.Context) error {
7980

8081
func (n *EC2NATGateway) Properties() types.Properties {
8182
properties := types.NewProperties()
83+
properties.Set("CreateTime", n.natgw.CreateTime.Format(time.RFC3339))
8284
for _, tagValue := range n.natgw.Tags {
8385
properties.SetTag(tagValue.Key, tagValue.Value)
8486
}

resources/ec2-volume.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package resources
22

33
import (
44
"context"
5+
"time"
56

67
"github.com/aws/aws-sdk-go/service/ec2"
78

@@ -60,6 +61,7 @@ func (e *EC2Volume) Remove(_ context.Context) error {
6061
func (e *EC2Volume) Properties() types.Properties {
6162
properties := types.NewProperties()
6263
properties.Set("State", e.volume.State)
64+
properties.Set("CreateTime", e.volume.CreateTime.Format(time.RFC3339))
6365
for _, tagValue := range e.volume.Tags {
6466
properties.SetTag(tagValue.Key, tagValue.Value)
6567
}

0 commit comments

Comments
 (0)