Skip to content
This repository has been archived by the owner on Aug 16, 2022. It is now read-only.

Commit

Permalink
feat: Add image deprecation_time (#1099)
Browse files Browse the repository at this point in the history
  • Loading branch information
nndegz authored Jun 27, 2022
1 parent 5145461 commit 55762fd
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/tables/aws_ec2_images.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,4 @@ Describes an image.
|usage_operation|text|The operation of the Amazon EC2 instance and the billing code that is associated with the AMI.|
|virtualization_type|text|The type of virtualization of the AMI.|
|last_launched_time|timestamp without time zone|The timestamp of the last time the AMI was used for an EC2 instance launch.|
|deprecation_time|timestamp without time zone|The date and time to deprecate the AMI.|
6 changes: 6 additions & 0 deletions resources/services/ec2/images.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,12 @@ func Ec2Images() *schema.Table {
Type: schema.TypeTimestamp,
Resolver: resolveEc2ImageLastLaunchedTime,
},
{
Name: "deprecation_time",
Description: "The date and time to deprecate the AMI.",
Type: schema.TypeTimestamp,
Resolver: client.ResolveTimestampField("DeprecationTime"),
},
},
Relations: []*schema.Table{
{
Expand Down
2 changes: 2 additions & 0 deletions resources/services/ec2/images_mock_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ func buildEc2ImagesMock(t *testing.T, ctrl *gomock.Controller) client.Services {
creationDate := "1994-11-05T08:15:30-05:00"
g.OwnerId = aws.String("testAccount")
g.CreationDate = &creationDate
deprecationTime := "2050-11-05T08:15:30-05:00"
g.DeprecationTime = &deprecationTime

m.EXPECT().DescribeImages(gomock.Any(), gomock.Any(), gomock.Any()).Return(
&ec2.DescribeImagesOutput{
Expand Down

0 comments on commit 55762fd

Please sign in to comment.