Skip to content

Commit a43bf39

Browse files
authored
feat: Add more cases where DateTime types in CSV responses of AWS IAM… (#5526)
#### Summary The deserialization of CSV by iam in resource under `cloudquery-aws-provider` does not cover all cases, which may lead to wrong data pull out. For details, we can read the official AWS documents, as mentioned in this document: ``` https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_finding-unused.html ``` ![image](https://user-images.githubusercontent.com/12819457/206620402-ef7c062d-12b6-48ba-b2f5-10ea83930ce0.png) This is also mentioned in another document: ``` https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_getting-report.html ``` ![image](https://user-images.githubusercontent.com/12819457/206620542-e2eb93fe-c0f0-4ce8-bd96-dd7f94bc1c29.png) To sum up, we should add the case `no_information`: ![image](https://user-images.githubusercontent.com/12819457/206620046-5b50484f-d2db-4fa1-9659-6c1819e51c31.png) Please review my code, thank you
1 parent a26e3f1 commit a43bf39

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • plugins/source/aws/resources/services/iam/models

plugins/source/aws/resources/services/iam/models/iam.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ type DateTime struct {
4848

4949
func (d *DateTime) UnmarshalCSV(val string) (err error) {
5050
switch val {
51-
case "N/A", "not_supported":
51+
case "N/A", "not_supported", "no_information":
5252
d.Time = nil
5353
return nil
5454
}

0 commit comments

Comments
 (0)