cdk-real-drift 0.12.64 → 0.12.65
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 +4 -2
- package/dist/cli.js +26 -7
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1046,8 +1046,10 @@ place, since Cloud Control has no handler for the type),
|
|
|
1046
1046
|
`ecs:UpdateService` (reverts an `AWS::ECS::Service` `ServiceConnectConfiguration` /
|
|
1047
1047
|
`VolumeConfigurations` drift — the whole writeOnly prop is re-supplied, since Cloud
|
|
1048
1048
|
Control cannot sub-path patch it),
|
|
1049
|
-
`elasticbeanstalk:UpdateApplication` / `elasticbeanstalk:UpdateEnvironment`
|
|
1050
|
-
(revert an
|
|
1049
|
+
`elasticbeanstalk:UpdateApplication` / `elasticbeanstalk:UpdateEnvironment` /
|
|
1050
|
+
`elasticbeanstalk:UpdateApplicationResourceLifecycle` (revert an
|
|
1051
|
+
`AWS::ElasticBeanstalk::Application` — including its `ResourceLifecycleConfig` — or
|
|
1052
|
+
`Environment`),
|
|
1051
1053
|
`codebuild:UpdateReportGroup` (reverts an `AWS::CodeBuild::ReportGroup`),
|
|
1052
1054
|
`dax:UpdateCluster` / `dax:UpdateParameterGroup` (revert an `AWS::DAX::Cluster` /
|
|
1053
1055
|
`ParameterGroup`),
|
package/dist/cli.js
CHANGED
|
@@ -31,7 +31,7 @@ import { ChangeResourceRecordSetsCommand, ListResourceRecordSetsCommand, Route53
|
|
|
31
31
|
import { GetTopicAttributesCommand, ListSubscriptionsByTopicCommand, SNSClient, SetTopicAttributesCommand } from "@aws-sdk/client-sns";
|
|
32
32
|
import { ACMClient, DescribeCertificateCommand, ListTagsForCertificateCommand } from "@aws-sdk/client-acm";
|
|
33
33
|
import { BudgetsClient, DescribeBudgetCommand } from "@aws-sdk/client-budgets";
|
|
34
|
-
import { DescribeConfigurationSettingsCommand, ElasticBeanstalkClient, UpdateApplicationCommand, UpdateEnvironmentCommand } from "@aws-sdk/client-elastic-beanstalk";
|
|
34
|
+
import { DescribeConfigurationSettingsCommand, ElasticBeanstalkClient, UpdateApplicationCommand, UpdateApplicationResourceLifecycleCommand, UpdateEnvironmentCommand } from "@aws-sdk/client-elastic-beanstalk";
|
|
35
35
|
import { CognitoSyncClient, GetCognitoEventsCommand, SetCognitoEventsCommand } from "@aws-sdk/client-cognito-sync";
|
|
36
36
|
import { BatchGetProjectsCommand, BatchGetReportGroupsCommand, CodeBuildClient, UpdateReportGroupCommand } from "@aws-sdk/client-codebuild";
|
|
37
37
|
import { DescribeDBClustersCommand as DescribeDBClustersCommand$1, DescribeDBInstancesCommand as DescribeDBInstancesCommand$1, DocDBClient, ListTagsForResourceCommand, ModifyDBClusterCommand, ModifyDBInstanceCommand } from "@aws-sdk/client-docdb";
|
|
@@ -15984,23 +15984,42 @@ const writeLexBotLocales = async (ctx, ops) => {
|
|
|
15984
15984
|
}
|
|
15985
15985
|
};
|
|
15986
15986
|
const EB_APPLICATION_MODIFY_PARAMS = new Set(["Description"]);
|
|
15987
|
+
const EB_APPLICATION_DEFAULT_RESOURCE_LIFECYCLE = { VersionLifecycleConfig: {
|
|
15988
|
+
MaxCountRule: {
|
|
15989
|
+
DeleteSourceFromS3: false,
|
|
15990
|
+
Enabled: false,
|
|
15991
|
+
MaxCount: 200
|
|
15992
|
+
},
|
|
15993
|
+
MaxAgeRule: {
|
|
15994
|
+
DeleteSourceFromS3: false,
|
|
15995
|
+
MaxAgeInDays: 180,
|
|
15996
|
+
Enabled: false
|
|
15997
|
+
}
|
|
15998
|
+
} };
|
|
15999
|
+
const asObject = (v) => v !== null && typeof v === "object" && !Array.isArray(v) ? v : void 0;
|
|
15987
16000
|
const writeElasticBeanstalkApplication = async (ctx, ops) => {
|
|
15988
16001
|
const name = str(ctx.physicalId) ?? str(ctx.declared["ApplicationName"]);
|
|
15989
16002
|
if (!name) throw new Error("cannot resolve Elastic Beanstalk ApplicationName for revert");
|
|
16003
|
+
const client = new ElasticBeanstalkClient({
|
|
16004
|
+
region: ctx.region,
|
|
16005
|
+
...CLIENT_TIMEOUTS
|
|
16006
|
+
});
|
|
15990
16007
|
const input = { ApplicationName: name };
|
|
15991
16008
|
let any = false;
|
|
16009
|
+
let lifecycle;
|
|
15992
16010
|
for (const op of ops) {
|
|
15993
16011
|
const top = op.path.replace(/^\//, "").split("/")[0];
|
|
15994
16012
|
if (top && EB_APPLICATION_MODIFY_PARAMS.has(top)) {
|
|
15995
16013
|
input[top] = op.op === "remove" ? "" : str(ctx.declared[top]) ?? "";
|
|
15996
16014
|
any = true;
|
|
15997
|
-
}
|
|
16015
|
+
} else if (top === "ResourceLifecycleConfig") lifecycle = op.op === "remove" ? EB_APPLICATION_DEFAULT_RESOURCE_LIFECYCLE : asObject(ctx.declared["ResourceLifecycleConfig"]) ?? asObject(op.value) ?? EB_APPLICATION_DEFAULT_RESOURCE_LIFECYCLE;
|
|
15998
16016
|
}
|
|
15999
|
-
if (any) await new
|
|
16000
|
-
|
|
16001
|
-
|
|
16002
|
-
|
|
16003
|
-
|
|
16017
|
+
if (any) await client.send(new UpdateApplicationCommand(input));
|
|
16018
|
+
if (lifecycle !== void 0) await client.send(new UpdateApplicationResourceLifecycleCommand({
|
|
16019
|
+
ApplicationName: name,
|
|
16020
|
+
ResourceLifecycleConfig: lifecycle
|
|
16021
|
+
}));
|
|
16022
|
+
assertOpsConsumed("ElasticBeanstalk Application", ops, new Set([...EB_APPLICATION_MODIFY_PARAMS, "ResourceLifecycleConfig"]));
|
|
16004
16023
|
};
|
|
16005
16024
|
const EB_ENVIRONMENT_MODIFY_PARAMS = new Set(["Description"]);
|
|
16006
16025
|
const writeElasticBeanstalkEnvironment = async (ctx, ops) => {
|