Skip to content

Commit

Permalink
Add port and endpoint to aws.rds.dbinstance (#2946)
Browse files Browse the repository at this point in the history
A few more useful items to align with the dbcluster resource

Signed-off-by: Tim Smith <[email protected]>
  • Loading branch information
tas50 authored Jan 5, 2024
1 parent 6eb57f9 commit 2fc993b
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 0 deletions.
4 changes: 4 additions & 0 deletions providers/aws/resources/aws.lr
Original file line number Diff line number Diff line change
Expand Up @@ -1892,6 +1892,10 @@ private aws.rds.dbinstance @defaults("id region engine engineVersion") {
autoMinorVersionUpgrade bool
// The creation date of the RDS instance
createdTime time
// The port that the DB instance listens on. If the DB instance is part of a DB cluster, this can be a different port than the DB cluster port.
port int
// The connection endpoint for the DB instance
endpoint string
}

// Amazon ElastiCache
Expand Down
24 changes: 24 additions & 0 deletions providers/aws/resources/aws.lr.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions providers/aws/resources/aws.lr.manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1987,6 +1987,8 @@ resources:
min_mondoo_version: 5.19.1
deletionProtection: {}
enabledCloudwatchLogsExports: {}
endpoint:
min_mondoo_version: 9.0.0
engine:
min_mondoo_version: 5.19.1
engineVersion:
Expand All @@ -1995,6 +1997,8 @@ resources:
id: {}
multiAZ: {}
name: {}
port:
min_mondoo_version: 9.0.0
publiclyAccessible: {}
region: {}
securityGroups:
Expand Down
2 changes: 2 additions & 0 deletions providers/aws/resources/aws_rds.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ func (a *mqlAwsRds) getDbInstances(conn *connection.AwsConnection) []*jobpool.Jo
"id": llx.StringDataPtr(dbInstance.DBInstanceIdentifier),
"multiAZ": llx.BoolDataPtr(dbInstance.MultiAZ),
"name": llx.StringDataPtr(dbInstance.DBName),
"port": llx.IntData(convert.ToInt64From32(dbInstance.DbInstancePort)),
"publiclyAccessible": llx.BoolDataPtr(dbInstance.PubliclyAccessible),
"region": llx.StringData(regionVal),
"securityGroups": llx.ArrayData(sgs, types.Resource("aws.ec2.securitygroup")),
Expand All @@ -113,6 +114,7 @@ func (a *mqlAwsRds) getDbInstances(conn *connection.AwsConnection) []*jobpool.Jo
"storageIops": llx.IntData(convert.ToInt64From32(dbInstance.Iops)),
"storageType": llx.StringDataPtr(dbInstance.StorageType),
"tags": llx.MapData(rdsTagsToMap(dbInstance.TagList), types.String),
"endpoint": llx.StringDataPtr(dbInstance.Endpoint.Address),
})
if err != nil {
return nil, err
Expand Down

0 comments on commit 2fc993b

Please sign in to comment.