From 7fa83ef3aad9becf16b79ad5caf1faec0d0f1906 Mon Sep 17 00:00:00 2001 From: Kemal Hadimli Date: Mon, 16 Jan 2023 14:30:02 +0000 Subject: [PATCH] fix(aws): Add region to aws_glue_datacatalog_encryption_settings --- .../aws_glue_datacatalog_encryption_settings.md | 6 ++++-- .../services/glue/datacatalog_encryption_settings.go | 12 ++++++++---- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/plugins/source/aws/docs/tables/aws_glue_datacatalog_encryption_settings.md b/plugins/source/aws/docs/tables/aws_glue_datacatalog_encryption_settings.md index 64bc4cb9ac5fe3..cd26943db73c48 100644 --- a/plugins/source/aws/docs/tables/aws_glue_datacatalog_encryption_settings.md +++ b/plugins/source/aws/docs/tables/aws_glue_datacatalog_encryption_settings.md @@ -1,6 +1,8 @@ # Table: aws_glue_datacatalog_encryption_settings -The primary key for this table is **account_id**. +https://docs.aws.amazon.com/glue/latest/webapi/API_GetDataCatalogEncryptionSettings.html + +The composite primary key for this table is (**account_id**, **region**). ## Columns @@ -11,6 +13,6 @@ The primary key for this table is **account_id**. |_cq_id|UUID| |_cq_parent_id|UUID| |account_id (PK)|String| -|region|String| +|region (PK)|String| |connection_password_encryption|JSON| |encryption_at_rest|JSON| \ No newline at end of file diff --git a/plugins/source/aws/resources/services/glue/datacatalog_encryption_settings.go b/plugins/source/aws/resources/services/glue/datacatalog_encryption_settings.go index ff4d473ebf6f9c..61df58c922c6c7 100644 --- a/plugins/source/aws/resources/services/glue/datacatalog_encryption_settings.go +++ b/plugins/source/aws/resources/services/glue/datacatalog_encryption_settings.go @@ -9,10 +9,11 @@ import ( func DatacatalogEncryptionSettings() *schema.Table { return &schema.Table{ - Name: "aws_glue_datacatalog_encryption_settings", - Resolver: fetchGlueDatacatalogEncryptionSettings, - Transform: transformers.TransformWithStruct(&types.DataCatalogEncryptionSettings{}), - Multiplex: client.ServiceAccountRegionMultiplexer("glue"), + Name: "aws_glue_datacatalog_encryption_settings", + Description: "https://docs.aws.amazon.com/glue/latest/webapi/API_GetDataCatalogEncryptionSettings.html", + Resolver: fetchGlueDatacatalogEncryptionSettings, + Transform: transformers.TransformWithStruct(&types.DataCatalogEncryptionSettings{}), + Multiplex: client.ServiceAccountRegionMultiplexer("glue"), Columns: []schema.Column{ { Name: "account_id", @@ -26,6 +27,9 @@ func DatacatalogEncryptionSettings() *schema.Table { Name: "region", Type: schema.TypeString, Resolver: client.ResolveAWSRegion, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, }, }, }