cdk-real-drift 0.18.15 → 0.19.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/dist/cli.js +70 -4
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -39,7 +39,7 @@ import { ACMClient, DescribeCertificateCommand, ListTagsForCertificateCommand }
|
|
|
39
39
|
import { BudgetsClient, DescribeBudgetCommand } from "@aws-sdk/client-budgets";
|
|
40
40
|
import { DescribeConfigurationSettingsCommand, ElasticBeanstalkClient, UpdateApplicationCommand, UpdateApplicationResourceLifecycleCommand, UpdateEnvironmentCommand } from "@aws-sdk/client-elastic-beanstalk";
|
|
41
41
|
import { CognitoSyncClient, GetCognitoEventsCommand, SetCognitoEventsCommand } from "@aws-sdk/client-cognito-sync";
|
|
42
|
-
import { BatchGetProjectsCommand, BatchGetReportGroupsCommand, CodeBuildClient, UpdateReportGroupCommand } from "@aws-sdk/client-codebuild";
|
|
42
|
+
import { BatchGetProjectsCommand, BatchGetReportGroupsCommand, CodeBuildClient, UpdateProjectCommand, UpdateReportGroupCommand } from "@aws-sdk/client-codebuild";
|
|
43
43
|
import { DescribeDBClustersCommand as DescribeDBClustersCommand$1, DescribeDBInstancesCommand as DescribeDBInstancesCommand$1, DocDBClient, ListTagsForResourceCommand as ListTagsForResourceCommand$1, ModifyDBClusterCommand, ModifyDBInstanceCommand } from "@aws-sdk/client-docdb";
|
|
44
44
|
import { DAXClient, DescribeClustersCommand, DescribeParameterGroupsCommand, DescribeParametersCommand as DescribeParametersCommand$1, DescribeSubnetGroupsCommand, ListTagsCommand, UpdateClusterCommand, UpdateParameterGroupCommand } from "@aws-sdk/client-dax";
|
|
45
45
|
import { AttachGroupPolicyCommand, AttachRolePolicyCommand, AttachUserPolicyCommand, CreatePolicyVersionCommand, DeletePolicyVersionCommand, DeleteRolePolicyCommand, DetachGroupPolicyCommand, DetachRolePolicyCommand, DetachUserPolicyCommand, GetGroupPolicyCommand, GetPolicyCommand as GetPolicyCommand$1, GetPolicyVersionCommand, GetRolePolicyCommand, GetUserPolicyCommand, IAMClient, ListAccessKeysCommand, ListEntitiesForPolicyCommand, ListPolicyVersionsCommand, PutGroupPolicyCommand, PutRolePolicyCommand, PutUserPolicyCommand } from "@aws-sdk/client-iam";
|
|
@@ -48,7 +48,7 @@ import { DescribeParameterGroupsCommand as DescribeParameterGroupsCommand$1, Des
|
|
|
48
48
|
import { CloudWatchClient, DescribeAnomalyDetectorsCommand, DisableAlarmActionsCommand, EnableAlarmActionsCommand, PutAnomalyDetectorCommand } from "@aws-sdk/client-cloudwatch";
|
|
49
49
|
import { DLMClient, GetLifecyclePolicyCommand, UpdateLifecyclePolicyCommand } from "@aws-sdk/client-dlm";
|
|
50
50
|
import { DescribeResourceCommand, EntityNotFoundException, LakeFormationClient } from "@aws-sdk/client-lakeformation";
|
|
51
|
-
import { GetJobTemplateCommand, GetQueueCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$3, MediaConvertClient } from "@aws-sdk/client-mediaconvert";
|
|
51
|
+
import { GetJobTemplateCommand, GetQueueCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$3, MediaConvertClient, UpdateQueueCommand } from "@aws-sdk/client-mediaconvert";
|
|
52
52
|
import { ConfigServiceClient, DescribeConfigRulesCommand, DescribeConfigurationRecordersCommand, DescribeDeliveryChannelsCommand, PutConfigRuleCommand, PutConfigurationRecorderCommand } from "@aws-sdk/client-config-service";
|
|
53
53
|
import { DescribeConfigurationCommand, DescribeConfigurationRevisionCommand, KafkaClient, UpdateConfigurationCommand } from "@aws-sdk/client-kafka";
|
|
54
54
|
import { GetWorkgroupCommand, RedshiftServerlessClient } from "@aws-sdk/client-redshift-serverless";
|
|
@@ -3869,7 +3869,8 @@ const ELB_TG_ATTRIBUTE_DEFAULTS_BY_PROTOCOL = {
|
|
|
3869
3869
|
};
|
|
3870
3870
|
const ELB_TG_ATTRIBUTE_DEFAULTS_BY_TARGET_TYPE = {
|
|
3871
3871
|
alb: { "preserve_client_ip.enabled": "true" },
|
|
3872
|
-
ip: { "preserve_client_ip.enabled": "false" }
|
|
3872
|
+
ip: { "preserve_client_ip.enabled": "false" },
|
|
3873
|
+
instance: { "preserve_client_ip.enabled": "true" }
|
|
3873
3874
|
};
|
|
3874
3875
|
const SENTINEL_UNPARSEABLE = Symbol("unparseable");
|
|
3875
3876
|
function deepCompareUnordered(a, b) {
|
|
@@ -17887,6 +17888,66 @@ const writeCodeBuildReportGroup = async (ctx, ops) => {
|
|
|
17887
17888
|
...CLIENT_TIMEOUTS
|
|
17888
17889
|
}).send(new UpdateReportGroupCommand(input));
|
|
17889
17890
|
};
|
|
17891
|
+
const CODEBUILD_PROJECT_MODIFY_PARAMS = {
|
|
17892
|
+
Description: "description",
|
|
17893
|
+
TimeoutInMinutes: "timeoutInMinutes",
|
|
17894
|
+
QueuedTimeoutInMinutes: "queuedTimeoutInMinutes",
|
|
17895
|
+
ConcurrentBuildLimit: "concurrentBuildLimit",
|
|
17896
|
+
AutoRetryLimit: "autoRetryLimit",
|
|
17897
|
+
BadgeEnabled: "badgeEnabled",
|
|
17898
|
+
SourceVersion: "sourceVersion",
|
|
17899
|
+
ServiceRole: "serviceRole",
|
|
17900
|
+
EncryptionKey: "encryptionKey"
|
|
17901
|
+
};
|
|
17902
|
+
const writeCodeBuildProject = async (ctx, ops) => {
|
|
17903
|
+
const name = str(ctx.physicalId) ?? str(ctx.declared["Name"]);
|
|
17904
|
+
if (!name) throw new Error("cannot resolve CodeBuild project name for revert");
|
|
17905
|
+
const desired = await desiredModel("AWS::CodeBuild::Project", ctx, ops);
|
|
17906
|
+
const input = { name };
|
|
17907
|
+
let any = false;
|
|
17908
|
+
for (const op of ops) {
|
|
17909
|
+
const top = op.path.replace(/^\//, "").split("/")[0] ?? "";
|
|
17910
|
+
const apiKey = CODEBUILD_PROJECT_MODIFY_PARAMS[top];
|
|
17911
|
+
if (!apiKey) continue;
|
|
17912
|
+
let val = desired[top];
|
|
17913
|
+
if (val === void 0) if (top === "Description" || top === "SourceVersion") val = "";
|
|
17914
|
+
else if (top === "ConcurrentBuildLimit") val = -1;
|
|
17915
|
+
else throw new Error(`CodeBuild Project ${top} cannot be cleared via UpdateProject (a selective modify keeps an omitted field); update it manually`);
|
|
17916
|
+
input[apiKey] = val;
|
|
17917
|
+
any = true;
|
|
17918
|
+
}
|
|
17919
|
+
if (any) await new CodeBuildClient({
|
|
17920
|
+
region: ctx.region,
|
|
17921
|
+
...CLIENT_TIMEOUTS
|
|
17922
|
+
}).send(new UpdateProjectCommand(input));
|
|
17923
|
+
assertOpsConsumed("CodeBuild Project", ops, new Set(Object.keys(CODEBUILD_PROJECT_MODIFY_PARAMS)));
|
|
17924
|
+
};
|
|
17925
|
+
const MEDIACONVERT_QUEUE_MODIFY_PARAMS = {
|
|
17926
|
+
Status: "Status",
|
|
17927
|
+
Description: "Description"
|
|
17928
|
+
};
|
|
17929
|
+
const writeMediaConvertQueue = async (ctx, ops) => {
|
|
17930
|
+
const name = str(ctx.physicalId) ?? str(ctx.declared["Name"]);
|
|
17931
|
+
if (!name) throw new Error("cannot resolve MediaConvert queue name for revert");
|
|
17932
|
+
const desired = await desiredModel("AWS::MediaConvert::Queue", ctx, ops);
|
|
17933
|
+
const input = { Name: name };
|
|
17934
|
+
let any = false;
|
|
17935
|
+
for (const op of ops) {
|
|
17936
|
+
const top = op.path.replace(/^\//, "").split("/")[0] ?? "";
|
|
17937
|
+
const apiKey = MEDIACONVERT_QUEUE_MODIFY_PARAMS[top];
|
|
17938
|
+
if (!apiKey) continue;
|
|
17939
|
+
let val = desired[top];
|
|
17940
|
+
if (val === void 0) if (top === "Description") val = "";
|
|
17941
|
+
else throw new Error(`MediaConvert Queue ${top} cannot be cleared via UpdateQueue; update it manually`);
|
|
17942
|
+
input[apiKey] = val;
|
|
17943
|
+
any = true;
|
|
17944
|
+
}
|
|
17945
|
+
if (any) await new MediaConvertClient({
|
|
17946
|
+
region: ctx.region,
|
|
17947
|
+
...CLIENT_TIMEOUTS
|
|
17948
|
+
}).send(new UpdateQueueCommand(input));
|
|
17949
|
+
assertOpsConsumed("MediaConvert Queue", ops, new Set(Object.keys(MEDIACONVERT_QUEUE_MODIFY_PARAMS)));
|
|
17950
|
+
};
|
|
17890
17951
|
const DAX_CLUSTER_MODIFY_PARAMS = {
|
|
17891
17952
|
Description: "Description",
|
|
17892
17953
|
PreferredMaintenanceWindow: "PreferredMaintenanceWindow",
|
|
@@ -18611,7 +18672,9 @@ const SDK_WRITERS = {
|
|
|
18611
18672
|
"AWS::ApiGatewayV2::Stage": writeApiGatewayV2Stage,
|
|
18612
18673
|
"AWS::ElasticBeanstalk::Application": writeElasticBeanstalkApplication,
|
|
18613
18674
|
"AWS::ElasticBeanstalk::Environment": writeElasticBeanstalkEnvironment,
|
|
18675
|
+
"AWS::CodeBuild::Project": writeCodeBuildProject,
|
|
18614
18676
|
"AWS::CodeBuild::ReportGroup": writeCodeBuildReportGroup,
|
|
18677
|
+
"AWS::MediaConvert::Queue": writeMediaConvertQueue,
|
|
18615
18678
|
"AWS::DAX::Cluster": writeDaxCluster,
|
|
18616
18679
|
"AWS::DAX::ParameterGroup": writeDaxParameterGroup,
|
|
18617
18680
|
"AWS::ElastiCache::ParameterGroup": writeElastiCacheParameterGroup,
|
|
@@ -18992,7 +19055,10 @@ const REVERT_SET_DEFAULT_PATHS = new Set([
|
|
|
18992
19055
|
"AWS::ECS::Cluster\0ClusterSettings",
|
|
18993
19056
|
"AWS::CloudWatch::CompositeAlarm\0ActionsEnabled",
|
|
18994
19057
|
"AWS::ApiGateway::RestApi\0ApiKeySourceType",
|
|
18995
|
-
"AWS::Glue::Crawler\0SchemaChangePolicy"
|
|
19058
|
+
"AWS::Glue::Crawler\0SchemaChangePolicy",
|
|
19059
|
+
"AWS::CodeBuild::Project\0TimeoutInMinutes",
|
|
19060
|
+
"AWS::CodeBuild::Project\0QueuedTimeoutInMinutes",
|
|
19061
|
+
"AWS::MediaConvert::Queue\0Status"
|
|
18996
19062
|
]);
|
|
18997
19063
|
const REVERT_SET_DEFAULT_VALUES = {
|
|
18998
19064
|
"AWS::EC2::Subnet\0EnableDns64": false,
|