Skip to content

Commit

Permalink
Merge pull request #222 from ekristen/fix-rds-snapshot
Browse files Browse the repository at this point in the history
fix(rds-snapshot): protect against nil pointer
  • Loading branch information
ekristen authored Jul 20, 2024
2 parents 2df2c1e + 3c87567 commit 512552c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions resources/rds-snapshots.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,11 @@ func (i *RDSSnapshot) Properties() types.Properties {
Set("Identifier", i.snapshot.DBSnapshotIdentifier).
Set("SnapshotType", i.snapshot.SnapshotType).
Set("Status", i.snapshot.Status).
Set("AvailabilityZone", i.snapshot.AvailabilityZone).
Set("CreatedTime", i.snapshot.SnapshotCreateTime.Format(time.RFC3339))
Set("AvailabilityZone", i.snapshot.AvailabilityZone)

if i.snapshot != nil && i.snapshot.SnapshotCreateTime != nil {
properties.Set("CreatedTime", i.snapshot.SnapshotCreateTime.Format(time.RFC3339))
}

for _, tag := range i.tags {
properties.SetTag(tag.Key, tag.Value)
Expand Down

0 comments on commit 512552c

Please sign in to comment.