cdk-real-drift 0.3.14 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -0
- package/dist/cli.js +30 -0
- package/dist/cli.js.map +1 -1
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -698,6 +698,11 @@ covers them. **If you never run `revert`, cdkrd needs no write permissions at al
|
|
|
698
698
|
`ses:DescribeReceiptRuleSet`, `ses:DescribeReceiptRule`, `ses:ListReceiptFilters`
|
|
699
699
|
(the SES inbound receipt-rule family — `ReceiptRuleSet` / `ReceiptRule` /
|
|
700
700
|
`ReceiptFilter` — has no Cloud Control handlers),
|
|
701
|
+
`acm:DescribeCertificate` + `acm:ListTagsForCertificate` (read an
|
|
702
|
+
`AWS::CertificateManager::Certificate` — the ACM registry type ships no Cloud
|
|
703
|
+
Control read handler, so every cert was silently skipped, including an
|
|
704
|
+
out-of-band `Options.CertificateTransparencyLoggingPreference` flip or an
|
|
705
|
+
out-of-band deletion of a cert an ALB / CloudFront / API domain still references),
|
|
701
706
|
`glue:GetTable`, `logs:DescribeMetricFilters`, `scheduler:GetSchedule`,
|
|
702
707
|
`cloudwatch:DescribeAnomalyDetectors` (reads an
|
|
703
708
|
`AWS::CloudWatch::AnomalyDetector` — NON_PROVISIONABLE, no Cloud Control
|
package/dist/cli.js
CHANGED
|
@@ -21,6 +21,7 @@ import { DescribeEventBusCommand, EventBridgeClient, ListRulesCommand, PutPermis
|
|
|
21
21
|
import { GetPolicyCommand, LambdaClient, ListAliasesCommand as ListAliasesCommand$1, ListEventSourceMappingsCommand, ListFunctionUrlConfigsCommand, ListVersionsByFunctionCommand } from "@aws-sdk/client-lambda";
|
|
22
22
|
import { DescribeDBClustersCommand, DescribeDBInstancesCommand, RDSClient } from "@aws-sdk/client-rds";
|
|
23
23
|
import { GetTopicAttributesCommand, ListSubscriptionsByTopicCommand, SNSClient, SetTopicAttributesCommand } from "@aws-sdk/client-sns";
|
|
24
|
+
import { ACMClient, DescribeCertificateCommand, ListTagsForCertificateCommand } from "@aws-sdk/client-acm";
|
|
24
25
|
import { BudgetsClient, DescribeBudgetCommand } from "@aws-sdk/client-budgets";
|
|
25
26
|
import { DescribeConfigurationSettingsCommand, ElasticBeanstalkClient, UpdateApplicationCommand, UpdateEnvironmentCommand } from "@aws-sdk/client-elastic-beanstalk";
|
|
26
27
|
import { CognitoSyncClient, GetCognitoEventsCommand, SetCognitoEventsCommand } from "@aws-sdk/client-cognito-sync";
|
|
@@ -8296,7 +8297,36 @@ const readSesReceiptFilter = async ({ physicalId, declared, region }) => {
|
|
|
8296
8297
|
} }
|
|
8297
8298
|
} };
|
|
8298
8299
|
};
|
|
8300
|
+
const ACM_DEFAULT_TRANSPARENCY = "ENABLED";
|
|
8301
|
+
const readAcmCertificate = async ({ physicalId, declared, region }) => {
|
|
8302
|
+
const arn = str$1(physicalId);
|
|
8303
|
+
if (!arn || !arn.startsWith("arn:")) return void 0;
|
|
8304
|
+
const c = new ACMClient({
|
|
8305
|
+
region,
|
|
8306
|
+
...READ_RETRY
|
|
8307
|
+
});
|
|
8308
|
+
const cert = (await c.send(new DescribeCertificateCommand({ CertificateArn: arn }))).Certificate;
|
|
8309
|
+
if (!cert) return void 0;
|
|
8310
|
+
const model = {};
|
|
8311
|
+
if (str$1(cert.DomainName)) model.DomainName = cert.DomainName;
|
|
8312
|
+
if (str$1(cert.KeyAlgorithm)) model.KeyAlgorithm = cert.KeyAlgorithm;
|
|
8313
|
+
const declaresSans = Array.isArray(declared.SubjectAlternativeNames) && declared.SubjectAlternativeNames.length > 0;
|
|
8314
|
+
const sans = (cert.SubjectAlternativeNames ?? []).filter((s) => str$1(s) !== void 0);
|
|
8315
|
+
if (declaresSans && sans.length > 0) model.SubjectAlternativeNames = sans;
|
|
8316
|
+
const pref = str$1(cert.Options?.CertificateTransparencyLoggingPreference);
|
|
8317
|
+
const declaresOptions = declared.Options !== void 0 && declared.Options !== null && typeof declared.Options === "object";
|
|
8318
|
+
if (pref && (declaresOptions || pref !== ACM_DEFAULT_TRANSPARENCY)) model.Options = { CertificateTransparencyLoggingPreference: pref };
|
|
8319
|
+
try {
|
|
8320
|
+
const tags = ((await c.send(new ListTagsForCertificateCommand({ CertificateArn: arn }))).Tags ?? []).filter((tag) => str$1(tag.Key) !== void 0).map((tag) => ({
|
|
8321
|
+
Key: tag.Key,
|
|
8322
|
+
Value: tag.Value ?? ""
|
|
8323
|
+
}));
|
|
8324
|
+
if (tags.length > 0) model.Tags = tags;
|
|
8325
|
+
} catch {}
|
|
8326
|
+
return model;
|
|
8327
|
+
};
|
|
8299
8328
|
const SDK_OVERRIDES = {
|
|
8329
|
+
"AWS::CertificateManager::Certificate": readAcmCertificate,
|
|
8300
8330
|
"AWS::SES::ReceiptRuleSet": readSesReceiptRuleSet,
|
|
8301
8331
|
"AWS::SES::ReceiptRule": readSesReceiptRule,
|
|
8302
8332
|
"AWS::SES::ReceiptFilter": readSesReceiptFilter,
|