Skip to content

Commit

Permalink
⭐️ Expose the aws.rds.dbcluster httpEndpointEnabled field (#5213)
Browse files Browse the repository at this point in the history
Signed-off-by: Tim Smith <tsmith84@gmail.com>
  • Loading branch information
tas50 authored Feb 14, 2025
1 parent 941326f commit 5fed91a
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 11 deletions.
4 changes: 3 additions & 1 deletion providers/aws/resources/aws.lr
Original file line number Diff line number Diff line change
Expand Up @@ -2173,6 +2173,8 @@ aws.rds.dbcluster @defaults("id region engine engineVersion") {
preferredMaintenanceWindow string
// Preferred backup window for the database cluster
preferredBackupWindow string
// Whether the HTTP API endpoint is enabled
httpEndpointEnabled bool
}

// Amazon RDS snapshot
Expand Down Expand Up @@ -2231,7 +2233,7 @@ aws.rds.dbinstance @defaults("id region engine engineVersion") {
region string
// Availability zone where the instance exists
availabilityZone string
// Whether the instance is publicly accessible
// Whether the instance is publicly accessible. Note: This will only return a value for non-Aurora Multi-AZ DB clusters
publiclyAccessible bool
// List of log types the instance is configured to export to CloudWatch logs
enabledCloudwatchLogsExports []string
Expand Down
12 changes: 12 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.

2 changes: 2 additions & 0 deletions providers/aws/resources/aws.lr.manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2479,6 +2479,8 @@ resources:
min_mondoo_version: 9.0.0
hostedZoneId:
min_mondoo_version: 9.0.0
httpEndpointEnabled:
min_mondoo_version: 9.0.0
iamDatabaseAuthentication:
min_mondoo_version: latest
id: {}
Expand Down
21 changes: 11 additions & 10 deletions providers/aws/resources/aws_rds.go
Original file line number Diff line number Diff line change
Expand Up @@ -573,25 +573,35 @@ func newMqlAwsRdsCluster(runtime *plugin.Runtime, region string, accountID strin

resource, err := CreateResource(runtime, "aws.rds.dbcluster",
map[string]*llx.RawData{
"activityStreamMode": llx.StringData(string(cluster.ActivityStreamMode)),
"activityStreamStatus": llx.StringData(string(cluster.ActivityStreamStatus)),
"arn": llx.StringDataPtr(cluster.DBClusterArn),
"autoMinorVersionUpgrade": llx.BoolDataPtr(cluster.AutoMinorVersionUpgrade),
"availabilityZones": llx.ArrayData(stringSliceAZs, types.String),
"backupRetentionPeriod": llx.IntDataDefault(cluster.BackupRetentionPeriod, 0),
"certificateAuthority": llx.StringDataPtr(caIdentifier),
"certificateExpiresAt": llx.TimeDataPtr(certificateExpiration),
"clusterDbInstanceClass": llx.StringDataPtr(cluster.DBClusterInstanceClass),
"createdTime": llx.TimeDataPtr(cluster.ClusterCreateTime),
"createdAt": llx.TimeDataPtr(cluster.ClusterCreateTime),
"createdTime": llx.TimeDataPtr(cluster.ClusterCreateTime),
"deletionProtection": llx.BoolDataPtr(cluster.DeletionProtection),
"endpoint": llx.StringDataPtr(cluster.Endpoint),
"engine": llx.StringDataPtr(cluster.Engine),
"engineLifecycleSupport": llx.StringDataPtr(cluster.EngineLifecycleSupport),
"engineVersion": llx.StringDataPtr(cluster.EngineVersion),
"hostedZoneId": llx.StringDataPtr(cluster.HostedZoneId),
"httpEndpointEnabled": llx.BoolDataPtr(cluster.HttpEndpointEnabled),
"iamDatabaseAuthentication": llx.BoolDataPtr(cluster.IAMDatabaseAuthenticationEnabled),
"id": llx.StringDataPtr(cluster.DBClusterIdentifier),
"latestRestorableTime": llx.TimeDataPtr(cluster.LatestRestorableTime),
"masterUsername": llx.StringDataPtr(cluster.MasterUsername),
"members": llx.ArrayData(mqlRdsDbInstances, types.Resource("aws.rds.dbinstance")),
"monitoringInterval": llx.IntDataPtr(cluster.MonitoringInterval),
"multiAZ": llx.BoolDataPtr(cluster.MultiAZ),
"networkType": llx.StringDataPtr(cluster.NetworkType),
"port": llx.IntDataDefault(cluster.Port, -1),
"preferredBackupWindow": llx.StringDataPtr(cluster.PreferredBackupWindow),
"preferredMaintenanceWindow": llx.StringDataPtr(cluster.PreferredMaintenanceWindow),
"publiclyAccessible": llx.BoolDataPtr(cluster.PubliclyAccessible),
"region": llx.StringData(region),
"status": llx.StringDataPtr(cluster.Status),
Expand All @@ -600,15 +610,6 @@ func newMqlAwsRdsCluster(runtime *plugin.Runtime, region string, accountID strin
"storageIops": llx.IntDataDefault(cluster.Iops, 0),
"storageType": llx.StringDataPtr(cluster.StorageType),
"tags": llx.MapData(rdsTagsToMap(cluster.TagList), types.String),
"certificateExpiresAt": llx.TimeDataPtr(certificateExpiration),
"certificateAuthority": llx.StringDataPtr(caIdentifier),
"iamDatabaseAuthentication": llx.BoolDataPtr(cluster.IAMDatabaseAuthenticationEnabled),
"activityStreamMode": llx.StringData(string(cluster.ActivityStreamMode)),
"activityStreamStatus": llx.StringData(string(cluster.ActivityStreamStatus)),
"monitoringInterval": llx.IntDataPtr(cluster.MonitoringInterval),
"networkType": llx.StringDataPtr(cluster.NetworkType),
"preferredMaintenanceWindow": llx.StringDataPtr(cluster.PreferredMaintenanceWindow),
"preferredBackupWindow": llx.StringDataPtr(cluster.PreferredBackupWindow),
})
if err != nil {
return nil, err
Expand Down

0 comments on commit 5fed91a

Please sign in to comment.