cdk-real-drift 0.12.64 → 0.12.66
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 +34 -20
- 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";
|
|
@@ -3158,7 +3158,8 @@ const DEFAULT_MANAGED_NAME_PATHS = {
|
|
|
3158
3158
|
"AWS::Neptune::DBCluster": { DBClusterParameterGroupName: /^default\./ },
|
|
3159
3159
|
"AWS::Neptune::DBInstance": { DBParameterGroupName: /^default\./ },
|
|
3160
3160
|
"AWS::Redshift::Cluster": { ClusterParameterGroupName: /^default\./ },
|
|
3161
|
-
"AWS::MemoryDB::Cluster": { ParameterGroupName: /^default\./ }
|
|
3161
|
+
"AWS::MemoryDB::Cluster": { ParameterGroupName: /^default\./ },
|
|
3162
|
+
"AWS::CloudFormation::Stack": { RoleARN: /^arn:aws[\w-]*:iam::\d{12}:role\/cdk-[a-z0-9]+-cfn-exec-role-\d{12}-[a-z0-9-]+$/ }
|
|
3162
3163
|
};
|
|
3163
3164
|
const GENERATED_TOPLEVEL_PATHS = {
|
|
3164
3165
|
"AWS::ApiGatewayV2::Stage": new Set(["DeploymentId"]),
|
|
@@ -3401,11 +3402,7 @@ const VALUE_INDEPENDENT_DEFAULT_TOPLEVEL_PATHS = {
|
|
|
3401
3402
|
"ClusterVersion"
|
|
3402
3403
|
]),
|
|
3403
3404
|
"AWS::OpenSearchService::Domain": new Set(["OffPeakWindowOptions"]),
|
|
3404
|
-
"AWS::AmazonMQ::Broker": new Set([
|
|
3405
|
-
"MaintenanceWindowStartTime",
|
|
3406
|
-
"SecurityGroups",
|
|
3407
|
-
"SubnetIds"
|
|
3408
|
-
]),
|
|
3405
|
+
"AWS::AmazonMQ::Broker": new Set(["MaintenanceWindowStartTime", "SubnetIds"]),
|
|
3409
3406
|
"AWS::EC2::Instance": new Set([
|
|
3410
3407
|
"PrivateIpAddress",
|
|
3411
3408
|
"CpuOptions",
|
|
@@ -3435,11 +3432,7 @@ const VALUE_INDEPENDENT_DEFAULT_TOPLEVEL_PATHS = {
|
|
|
3435
3432
|
"SecurityGroupIds",
|
|
3436
3433
|
"SubnetIds"
|
|
3437
3434
|
]),
|
|
3438
|
-
"AWS::CloudFormation::Stack": new Set([
|
|
3439
|
-
"TemplateBody",
|
|
3440
|
-
"RoleARN",
|
|
3441
|
-
"Capabilities"
|
|
3442
|
-
])
|
|
3435
|
+
"AWS::CloudFormation::Stack": new Set(["TemplateBody", "Capabilities"])
|
|
3443
3436
|
};
|
|
3444
3437
|
function isPhysicalIdSegment(value, physicalId) {
|
|
3445
3438
|
if (typeof value !== "string" || physicalId === void 0) return false;
|
|
@@ -5492,7 +5485,8 @@ function guardDutyFeaturesAllAtDefault(features) {
|
|
|
5492
5485
|
const DEFAULT_SG_LIST_PATHS = {
|
|
5493
5486
|
"AWS::ElasticLoadBalancingV2::LoadBalancer": "SecurityGroups",
|
|
5494
5487
|
"AWS::EC2::NetworkInterface": "GroupSet",
|
|
5495
|
-
"AWS::Neptune::DBCluster": "VpcSecurityGroupIds"
|
|
5488
|
+
"AWS::Neptune::DBCluster": "VpcSecurityGroupIds",
|
|
5489
|
+
"AWS::AmazonMQ::Broker": "SecurityGroups"
|
|
5496
5490
|
};
|
|
5497
5491
|
/** #889 fold decision for an UNDECLARED default-SG list (ALB SecurityGroups / ENI GroupSet).
|
|
5498
5492
|
* Returns whether the value-independent fold should still apply for this live value:
|
|
@@ -12293,7 +12287,8 @@ function liveModelMap(reads) {
|
|
|
12293
12287
|
const DEFAULT_SG_LIST_TYPES = new Set([
|
|
12294
12288
|
"AWS::ElasticLoadBalancingV2::LoadBalancer",
|
|
12295
12289
|
"AWS::EC2::NetworkInterface",
|
|
12296
|
-
"AWS::Neptune::DBCluster"
|
|
12290
|
+
"AWS::Neptune::DBCluster",
|
|
12291
|
+
"AWS::AmazonMQ::Broker"
|
|
12297
12292
|
]);
|
|
12298
12293
|
const defaultSgIdsCache = /* @__PURE__ */ new Map();
|
|
12299
12294
|
async function fetchDefaultSgIds(region) {
|
|
@@ -15984,23 +15979,42 @@ const writeLexBotLocales = async (ctx, ops) => {
|
|
|
15984
15979
|
}
|
|
15985
15980
|
};
|
|
15986
15981
|
const EB_APPLICATION_MODIFY_PARAMS = new Set(["Description"]);
|
|
15982
|
+
const EB_APPLICATION_DEFAULT_RESOURCE_LIFECYCLE = { VersionLifecycleConfig: {
|
|
15983
|
+
MaxCountRule: {
|
|
15984
|
+
DeleteSourceFromS3: false,
|
|
15985
|
+
Enabled: false,
|
|
15986
|
+
MaxCount: 200
|
|
15987
|
+
},
|
|
15988
|
+
MaxAgeRule: {
|
|
15989
|
+
DeleteSourceFromS3: false,
|
|
15990
|
+
MaxAgeInDays: 180,
|
|
15991
|
+
Enabled: false
|
|
15992
|
+
}
|
|
15993
|
+
} };
|
|
15994
|
+
const asObject = (v) => v !== null && typeof v === "object" && !Array.isArray(v) ? v : void 0;
|
|
15987
15995
|
const writeElasticBeanstalkApplication = async (ctx, ops) => {
|
|
15988
15996
|
const name = str(ctx.physicalId) ?? str(ctx.declared["ApplicationName"]);
|
|
15989
15997
|
if (!name) throw new Error("cannot resolve Elastic Beanstalk ApplicationName for revert");
|
|
15998
|
+
const client = new ElasticBeanstalkClient({
|
|
15999
|
+
region: ctx.region,
|
|
16000
|
+
...CLIENT_TIMEOUTS
|
|
16001
|
+
});
|
|
15990
16002
|
const input = { ApplicationName: name };
|
|
15991
16003
|
let any = false;
|
|
16004
|
+
let lifecycle;
|
|
15992
16005
|
for (const op of ops) {
|
|
15993
16006
|
const top = op.path.replace(/^\//, "").split("/")[0];
|
|
15994
16007
|
if (top && EB_APPLICATION_MODIFY_PARAMS.has(top)) {
|
|
15995
16008
|
input[top] = op.op === "remove" ? "" : str(ctx.declared[top]) ?? "";
|
|
15996
16009
|
any = true;
|
|
15997
|
-
}
|
|
16010
|
+
} 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
16011
|
}
|
|
15999
|
-
if (any) await new
|
|
16000
|
-
|
|
16001
|
-
|
|
16002
|
-
|
|
16003
|
-
|
|
16012
|
+
if (any) await client.send(new UpdateApplicationCommand(input));
|
|
16013
|
+
if (lifecycle !== void 0) await client.send(new UpdateApplicationResourceLifecycleCommand({
|
|
16014
|
+
ApplicationName: name,
|
|
16015
|
+
ResourceLifecycleConfig: lifecycle
|
|
16016
|
+
}));
|
|
16017
|
+
assertOpsConsumed("ElasticBeanstalk Application", ops, new Set([...EB_APPLICATION_MODIFY_PARAMS, "ResourceLifecycleConfig"]));
|
|
16004
16018
|
};
|
|
16005
16019
|
const EB_ENVIRONMENT_MODIFY_PARAMS = new Set(["Description"]);
|
|
16006
16020
|
const writeElasticBeanstalkEnvironment = async (ctx, ops) => {
|