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

Unify more of the aws resources on createdAt #5041

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
28 changes: 20 additions & 8 deletions providers/aws/resources/aws.lr
Original file line number Diff line number Diff line change
Expand Up @@ -768,20 +768,24 @@ private aws.iam.usercredentialreportentry @defaults("arn") {

// IAM user
user() aws.iam.user
// Time when user was created
// Time when user was created: deprecated, use createdAt
userCreationTime() time
// Time when user was created
createdAt() time
}

// AWS IAM user
private aws.iam.user @defaults("arn name") {
private aws.iam.user @defaults("arn name createdAt") {
// ARN of the IAM user
arn string
// ID of the IAM user
id string
// Name of the user
name string
// Time when user was created
// Time when user was created: deprecated, use createdAt
createDate time
// Time when user was created
createdAt time
// Time when password was last used
passwordLastUsed time
// Tags for the IAM user
Expand All @@ -802,8 +806,10 @@ private aws.iam.user @defaults("arn name") {
private aws.iam.instanceProfile @defaults("arn instanceProfileId") {
// ARN of the instance profile
arn string
// Time when the instance profile was created
// Time when the instance profile was created: deprecated, use createdAt
createDate time
// Time when the instance profile was created
createdAt time
// ID of the IAM instance profile
instanceProfileId string
// Name of the instance profile
Expand Down Expand Up @@ -836,8 +842,10 @@ private aws.iam.policy @defaults("arn name") {
isAttachable() bool
// Number of principal entities (users, groups, and roles) that the policy is attached to
attachmentCount() int
// Time when the policy was created
// Time when the policy was created: deprecated, use createdAt
createDate() time
// Time when the policy was created
createdAt() time
// Time when the policy was updated
updateDate() time
// Scope of the policy
Expand All @@ -856,7 +864,7 @@ private aws.iam.policy @defaults("arn name") {
}

// AWS IAM policy version
private aws.iam.policyversion @defaults("arn isDefaultVersion") {
private aws.iam.policyversion @defaults("arn isDefaultVersion createdAt") {
// ARN of the policy version
arn string
// Version ID
Expand All @@ -865,8 +873,10 @@ private aws.iam.policyversion @defaults("arn isDefaultVersion") {
isDefaultVersion bool
// JSON statements for this policy version
document() dict
// Time when this policy version was created
// Time when this policy version was created: deprecated, use createdAt
createDate time
// Time when this policy version was created
createdAt time
}

// AWS IAM role
Expand All @@ -881,8 +891,10 @@ private aws.iam.role @defaults("arn name") {
description string
// Tags associated with the role
tags map[string]string
// Time when the role was created
// Time when the role was created: deprecated, use createdAt
createDate time
// Time when the role was created
createdAt time
// Policy document that grants an entity permission to assume the role
assumeRolePolicyDocument dict
}
Expand Down
76 changes: 76 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.

11 changes: 11 additions & 0 deletions providers/aws/resources/aws.lr.manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2022,6 +2022,7 @@ resources:
fields:
arn: {}
createDate: {}
createdAt: {}
iamRoles: {}
instanceProfileId: {}
instanceProfileName: {}
Expand Down Expand Up @@ -2050,6 +2051,8 @@ resources:
attachedUsers: {}
attachmentCount: {}
createDate: {}
createdAt:
min_mondoo_version: 9.0.0
defaultVersion: {}
description: {}
id: {}
Expand All @@ -2072,6 +2075,8 @@ resources:
fields:
arn: {}
createDate: {}
createdAt:
min_mondoo_version: 9.0.0
document: {}
isDefaultVersion: {}
versionId: {}
Expand All @@ -2088,6 +2093,8 @@ resources:
arn: {}
assumeRolePolicyDocument: {}
createDate: {}
createdAt:
min_mondoo_version: 9.0.0
description: {}
id: {}
name: {}
Expand All @@ -2106,6 +2113,8 @@ resources:
arn: {}
attachedPolicies: {}
createDate: {}
createdAt:
min_mondoo_version: 9.0.0
groups: {}
id: {}
loginProfile:
Expand Down Expand Up @@ -2139,6 +2148,8 @@ resources:
cert1LastRotated: {}
cert2Active: {}
cert2LastRotated: {}
createdAt:
min_mondoo_version: 9.0.0
mfaActive: {}
passwordEnabled: {}
passwordLastChanged: {}
Expand Down
Loading
Loading