diff --git a/providers/aws/resources/aws.lr b/providers/aws/resources/aws.lr index ff09ccd13a..64f417affe 100644 --- a/providers/aws/resources/aws.lr +++ b/providers/aws/resources/aws.lr @@ -1000,7 +1000,7 @@ private aws.s3.bucket @defaults("arn") { // False if the bucket no longer exists (stale reference) exists bool // Date the bucket was created - creationDate time + createdTime time } // Amazon S3 Bucket Grant @@ -1262,7 +1262,7 @@ private aws.rds.dbinstance @defaults("id region engine engineVersion") { // Indicates whether minor version patches are applied automatically autoMinorVersionUpgrade bool // The creation date of the RDS instance - creationDate time + createdTime time } // Amazon ElastiCache diff --git a/providers/aws/resources/aws.lr.go b/providers/aws/resources/aws.lr.go index 34dc4dd228..856efc3cfa 100644 --- a/providers/aws/resources/aws.lr.go +++ b/providers/aws/resources/aws.lr.go @@ -1630,8 +1630,8 @@ var getDataFields = map[string]func(r plugin.Resource) *plugin.DataRes{ "aws.s3.bucket.exists": func(r plugin.Resource) *plugin.DataRes { return (r.(*mqlAwsS3Bucket).GetExists()).ToDataRes(types.Bool) }, - "aws.s3.bucket.creationDate": func(r plugin.Resource) *plugin.DataRes { - return (r.(*mqlAwsS3Bucket).GetCreationDate()).ToDataRes(types.Time) + "aws.s3.bucket.createdTime": func(r plugin.Resource) *plugin.DataRes { + return (r.(*mqlAwsS3Bucket).GetCreatedTime()).ToDataRes(types.Time) }, "aws.s3.bucket.grant.id": func(r plugin.Resource) *plugin.DataRes { return (r.(*mqlAwsS3BucketGrant).GetId()).ToDataRes(types.String) @@ -1924,8 +1924,8 @@ var getDataFields = map[string]func(r plugin.Resource) *plugin.DataRes{ "aws.rds.dbinstance.autoMinorVersionUpgrade": func(r plugin.Resource) *plugin.DataRes { return (r.(*mqlAwsRdsDbinstance).GetAutoMinorVersionUpgrade()).ToDataRes(types.Bool) }, - "aws.rds.dbinstance.creationDate": func(r plugin.Resource) *plugin.DataRes { - return (r.(*mqlAwsRdsDbinstance).GetCreationDate()).ToDataRes(types.Time) + "aws.rds.dbinstance.createdTime": func(r plugin.Resource) *plugin.DataRes { + return (r.(*mqlAwsRdsDbinstance).GetCreatedTime()).ToDataRes(types.Time) }, "aws.elasticache.clusters": func(r plugin.Resource) *plugin.DataRes { return (r.(*mqlAwsElasticache).GetClusters()).ToDataRes(types.Array(types.Dict)) @@ -4313,8 +4313,8 @@ var setDataFields = map[string]func(r plugin.Resource, v *llx.RawData) bool { r.(*mqlAwsS3Bucket).Exists, ok = plugin.RawToTValue[bool](v.Value, v.Error) return }, - "aws.s3.bucket.creationDate": func(r plugin.Resource, v *llx.RawData) (ok bool) { - r.(*mqlAwsS3Bucket).CreationDate, ok = plugin.RawToTValue[*time.Time](v.Value, v.Error) + "aws.s3.bucket.createdTime": func(r plugin.Resource, v *llx.RawData) (ok bool) { + r.(*mqlAwsS3Bucket).CreatedTime, ok = plugin.RawToTValue[*time.Time](v.Value, v.Error) return }, "aws.s3.bucket.grant.__id": func(r plugin.Resource, v *llx.RawData) (ok bool) { @@ -4769,8 +4769,8 @@ var setDataFields = map[string]func(r plugin.Resource, v *llx.RawData) bool { r.(*mqlAwsRdsDbinstance).AutoMinorVersionUpgrade, ok = plugin.RawToTValue[bool](v.Value, v.Error) return }, - "aws.rds.dbinstance.creationDate": func(r plugin.Resource, v *llx.RawData) (ok bool) { - r.(*mqlAwsRdsDbinstance).CreationDate, ok = plugin.RawToTValue[*time.Time](v.Value, v.Error) + "aws.rds.dbinstance.createdTime": func(r plugin.Resource, v *llx.RawData) (ok bool) { + r.(*mqlAwsRdsDbinstance).CreatedTime, ok = plugin.RawToTValue[*time.Time](v.Value, v.Error) return }, "aws.elasticache.__id": func(r plugin.Resource, v *llx.RawData) (ok bool) { @@ -11313,7 +11313,7 @@ type mqlAwsS3Bucket struct { Encryption plugin.TValue[interface{}] PublicAccessBlock plugin.TValue[interface{}] Exists plugin.TValue[bool] - CreationDate plugin.TValue[*time.Time] + CreatedTime plugin.TValue[*time.Time] } // createAwsS3Bucket creates a new instance of this resource @@ -11479,8 +11479,8 @@ func (c *mqlAwsS3Bucket) GetExists() *plugin.TValue[bool] { return &c.Exists } -func (c *mqlAwsS3Bucket) GetCreationDate() *plugin.TValue[*time.Time] { - return &c.CreationDate +func (c *mqlAwsS3Bucket) GetCreatedTime() *plugin.TValue[*time.Time] { + return &c.CreatedTime } // mqlAwsS3BucketGrant for the aws.s3.bucket.grant resource @@ -12661,7 +12661,7 @@ type mqlAwsRdsDbinstance struct { SecurityGroups plugin.TValue[[]interface{}] Status plugin.TValue[string] AutoMinorVersionUpgrade plugin.TValue[bool] - CreationDate plugin.TValue[*time.Time] + CreatedTime plugin.TValue[*time.Time] } // createAwsRdsDbinstance creates a new instance of this resource @@ -12809,8 +12809,8 @@ func (c *mqlAwsRdsDbinstance) GetAutoMinorVersionUpgrade() *plugin.TValue[bool] return &c.AutoMinorVersionUpgrade } -func (c *mqlAwsRdsDbinstance) GetCreationDate() *plugin.TValue[*time.Time] { - return &c.CreationDate +func (c *mqlAwsRdsDbinstance) GetCreatedTime() *plugin.TValue[*time.Time] { + return &c.CreatedTime } // mqlAwsElasticache for the aws.elasticache resource diff --git a/providers/aws/resources/aws.lr.manifest.yaml b/providers/aws/resources/aws.lr.manifest.yaml index f68e6fd62d..58148e5796 100755 --- a/providers/aws/resources/aws.lr.manifest.yaml +++ b/providers/aws/resources/aws.lr.manifest.yaml @@ -1809,7 +1809,7 @@ resources: availabilityZone: min_mondoo_version: 9.0.0 backupRetentionPeriod: {} - creationDate: + createdTime: min_mondoo_version: 9.0.0 dbInstanceClass: min_mondoo_version: 5.19.1 @@ -1977,7 +1977,7 @@ resources: acl: {} arn: {} cors: {} - creationDate: + createdTime: min_mondoo_version: 9.0.0 defaultLock: {} encryption: {} diff --git a/providers/aws/resources/aws_rds.go b/providers/aws/resources/aws_rds.go index ad7c0930d1..7b4728777e 100644 --- a/providers/aws/resources/aws_rds.go +++ b/providers/aws/resources/aws_rds.go @@ -112,7 +112,7 @@ func (a *mqlAwsRds) getDbInstances(conn *connection.AwsConnection) []*jobpool.Jo "storageType": llx.StringData(convert.ToString(dbInstance.StorageType)), "storageIops": llx.IntData(convert.ToInt64From32(dbInstance.Iops)), "tags": llx.MapData(rdsTagsToMap(dbInstance.TagList), types.String), - "creationDate": llx.TimeData(toTime(dbInstance.InstanceCreateTime)), + "createdTime": llx.TimeData(toTime(dbInstance.InstanceCreateTime)), }) if err != nil { return nil, err diff --git a/providers/aws/resources/aws_s3.go b/providers/aws/resources/aws_s3.go index 9314484ed7..35efe94925 100644 --- a/providers/aws/resources/aws_s3.go +++ b/providers/aws/resources/aws_s3.go @@ -83,11 +83,11 @@ func (a *mqlAwsS3) buckets() ([]interface{}, error) { } mqlS3Bucket, err := CreateResource(a.MqlRuntime, "aws.s3.bucket", map[string]*llx.RawData{ - "name": llx.StringData(convert.ToString(bucket.Name)), - "arn": llx.StringData(fmt.Sprintf(s3ArnPattern, convert.ToString(bucket.Name))), - "exists": llx.BoolData(true), - "location": llx.StringData(region), - "creationDate": llx.TimeData(toTime(bucket.CreationDate)), + "name": llx.StringData(convert.ToString(bucket.Name)), + "arn": llx.StringData(fmt.Sprintf(s3ArnPattern, convert.ToString(bucket.Name))), + "exists": llx.BoolData(true), + "location": llx.StringData(region), + "createdTime": llx.TimeData(toTime(bucket.CreationDate)), }) if err != nil { return nil, err