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

⭐️ Draft: Adding accessKeyCreateDate (aws) #3409

Closed
wants to merge 1 commit into from
Closed
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 @@ -718,6 +718,10 @@ private aws.iam.usercredentialreportentry @defaults("arn") {
accessKey1LastUsedRegion() string
// Service that last used the key
accessKey1LastUsedService() string
// Time when key was created
accessKey1CreateDate() time
// Time when key was created
accessKey2CreateDate() time

// Denotes if the access key is active
accessKey2Active() bool
Expand Down
28 changes: 28 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 @@ -1807,11 +1807,13 @@ resources:
The `aws.iam.credentialreportentry` provides fields for assessing the metadata for individual IAM Credential Report entries. For usage, read the `aws.iam` resource documentation.
fields:
accessKey1Active: {}
accessKey1CreateDate: {}
accessKey1LastRotated: {}
accessKey1LastUsedDate: {}
accessKey1LastUsedRegion: {}
accessKey1LastUsedService: {}
accessKey2Active: {}
accessKey2CreateDate: {}
accessKey2LastRotated: {}
accessKey2LastUsedDate: {}
accessKey2LastUsedRegion: {}
Expand Down
8 changes: 8 additions & 0 deletions providers/aws/resources/aws_iam.go
Original file line number Diff line number Diff line change
Expand Up @@ -605,6 +605,14 @@ func (p *mqlAwsIamUsercredentialreportentry) accessKey1LastUsedDate() (*time.Tim
return p.getTimeValue("access_key_1_last_used_date")
}

func (p *mqlAwsIamUsercredentialreportentry) accessKey1CreateDate() (*time.Time, error) {
return p.getTimeValue("access_key_1_create_date")
}

func (p *mqlAwsIamUsercredentialreportentry) accessKey2CreateDate() (*time.Time, error) {
return p.getTimeValue("access_key_2_create_date")
}

func (p *mqlAwsIamUsercredentialreportentry) accessKey1LastUsedRegion() (string, error) {
return p.getStringValue("access_key_1_last_used_region")
}
Expand Down
Loading