Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add port and endpoint to aws.rds.dbinstance #2946

Merged
merged 1 commit into from
Jan 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading