Skip to content

Commit

Permalink
fix(rds-snapshot): protect against nil pointer
Browse files Browse the repository at this point in the history
  • Loading branch information
ekristen committed Jul 20, 2024
1 parent f5e34a9 commit 3c87567
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 3c87567

Please sign in to comment.