Skip to content

Commit

Permalink
Merge pull request #175 from ekristen/rebuy-1222
Browse files Browse the repository at this point in the history
fix: add CreateTime property to EC2NATGateway and EC2Volume resources
  • Loading branch information
ekristen authored May 18, 2024
2 parents 5449ac5 + af0bf1f commit 91ab562
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions resources/ec2-nat-gateways.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package resources
import (
"context"
"fmt"
"time"

"github.com/gotidy/ptr"

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

func (n *EC2NATGateway) Properties() types.Properties {
properties := types.NewProperties()
properties.Set("CreateTime", n.natgw.CreateTime.Format(time.RFC3339))
for _, tagValue := range n.natgw.Tags {
properties.SetTag(tagValue.Key, tagValue.Value)
}
Expand Down
2 changes: 2 additions & 0 deletions resources/ec2-volume.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package resources

import (
"context"
"time"

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

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

0 comments on commit 91ab562

Please sign in to comment.