From c256e71fa976b6318df07b619872ab5e3f3b7f34 Mon Sep 17 00:00:00 2001 From: Herman Schaaf Date: Mon, 19 Sep 2022 15:54:14 +0100 Subject: [PATCH] Fix iam users pk --- plugins/source/aws/codegen/recipes/iam.go | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/plugins/source/aws/codegen/recipes/iam.go b/plugins/source/aws/codegen/recipes/iam.go index 7676d4a82c3cf2..5dc6b8a8242861 100644 --- a/plugins/source/aws/codegen/recipes/iam.go +++ b/plugins/source/aws/codegen/recipes/iam.go @@ -228,13 +228,24 @@ func IAMResources() []*Resource { { SubService: "users", Struct: &iamService.UserWrapper{}, - SkipFields: []string{"Arn", "Tags"}, + SkipFields: []string{"Arn", "AccountId", "Id", "Tags"}, PostResourceResolver: `postIamUserResolver`, ExtraColumns: []codegen.ColumnDefinition{ { Name: "arn", Type: schema.TypeString, Resolver: `schema.PathResolver("Arn")`, + }, + { + Name: "account_id", + Type: schema.TypeString, + Resolver: `schema.PathResolver("AccountId")`, + Options: schema.ColumnCreationOptions{PrimaryKey: true}, + }, + { + Name: "id", + Type: schema.TypeString, + Resolver: `schema.PathResolver("Id")`, Options: schema.ColumnCreationOptions{PrimaryKey: true}, }, {