diff --git a/resources/provider/migrations/postgres/16_v0.10.2.down.sql b/resources/provider/migrations/postgres/16_v0.10.2.down.sql new file mode 100644 index 000000000..d631f9de8 --- /dev/null +++ b/resources/provider/migrations/postgres/16_v0.10.2.down.sql @@ -0,0 +1,4 @@ +ALTER TABLE IF EXISTS aws_rds_certificates + DROP CONSTRAINT aws_rds_certificates_pk; +ALTER TABLE IF EXISTS aws_rds_certificates + ADD CONSTRAINT aws_rds_certificates_pk PRIMARY KEY (arn); \ No newline at end of file diff --git a/resources/provider/migrations/postgres/16_v0.10.2.up.sql b/resources/provider/migrations/postgres/16_v0.10.2.up.sql new file mode 100644 index 000000000..bc228eeac --- /dev/null +++ b/resources/provider/migrations/postgres/16_v0.10.2.up.sql @@ -0,0 +1,4 @@ +ALTER TABLE IF EXISTS aws_rds_certificates + DROP CONSTRAINT aws_rds_certificates_pk; +ALTER TABLE IF EXISTS aws_rds_certificates + ADD CONSTRAINT aws_rds_certificates_pk PRIMARY KEY (account_id, arn); \ No newline at end of file diff --git a/resources/provider/migrations/timescale/16_v0.10.2.down.sql b/resources/provider/migrations/timescale/16_v0.10.2.down.sql new file mode 100644 index 000000000..98d3dd99f --- /dev/null +++ b/resources/provider/migrations/timescale/16_v0.10.2.down.sql @@ -0,0 +1,4 @@ +ALTER TABLE IF EXISTS aws_rds_certificates + DROP CONSTRAINT aws_rds_certificates_pk; +ALTER TABLE IF EXISTS aws_rds_certificates + ADD CONSTRAINT aws_rds_certificates_pk PRIMARY KEY (cq_fetch_date, arn); \ No newline at end of file diff --git a/resources/provider/migrations/timescale/16_v0.10.2.up.sql b/resources/provider/migrations/timescale/16_v0.10.2.up.sql new file mode 100644 index 000000000..e2524f55d --- /dev/null +++ b/resources/provider/migrations/timescale/16_v0.10.2.up.sql @@ -0,0 +1,4 @@ +ALTER TABLE IF EXISTS aws_rds_certificates + DROP CONSTRAINT aws_rds_certificates_pk; +ALTER TABLE IF EXISTS aws_rds_certificates + ADD CONSTRAINT aws_rds_certificates_pk PRIMARY KEY (cq_fetch_date, account_id, arn); \ No newline at end of file diff --git a/resources/services/rds/certificates.go b/resources/services/rds/certificates.go index 64b235755..9a072e1e2 100644 --- a/resources/services/rds/certificates.go +++ b/resources/services/rds/certificates.go @@ -17,7 +17,7 @@ func RdsCertificates() *schema.Table { Multiplex: client.ServiceAccountRegionMultiplexer("rds"), IgnoreError: client.IgnoreAccessDeniedServiceDisabled, DeleteFilter: client.DeleteAccountRegionFilter, - Options: schema.TableCreationOptions{PrimaryKeys: []string{"arn"}}, + Options: schema.TableCreationOptions{PrimaryKeys: []string{"account_id", "arn"}}, Columns: []schema.Column{ { Name: "account_id",