cdk-real-drift 0.18.15 → 0.19.1

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 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";
@@ -2644,6 +2644,11 @@ const KNOWN_DEFAULTS = {
2644
2644
  },
2645
2645
  "AWS::EC2::FlowLog": {
2646
2646
  MaxAggregationInterval: 600,
2647
+ DestinationOptions: {
2648
+ FileFormat: "plain-text",
2649
+ HiveCompatiblePartitions: false,
2650
+ PerHourPartition: false
2651
+ },
2647
2652
  LogFormat: "${version} ${account-id} ${interface-id} ${srcaddr} ${dstaddr} ${srcport} ${dstport} ${protocol} ${packets} ${bytes} ${start} ${end} ${action} ${log-status}"
2648
2653
  },
2649
2654
  "AWS::EC2::PlacementGroup": { SpreadLevel: "rack" },
@@ -2765,7 +2770,15 @@ const KNOWN_DEFAULTS = {
2765
2770
  "AWS::Config::ConfigRule": { EvaluationModes: [{ Mode: "DETECTIVE" }] },
2766
2771
  "AWS::RUM::AppMonitor": {
2767
2772
  Platform: "Web",
2768
- DeobfuscationConfiguration: { JavaScriptSourceMaps: { Status: "DISABLED" } }
2773
+ DeobfuscationConfiguration: { JavaScriptSourceMaps: { Status: "DISABLED" } },
2774
+ CustomEvents: { Status: "DISABLED" },
2775
+ AppMonitorConfiguration: {
2776
+ IncludedPages: [],
2777
+ ExcludedPages: [],
2778
+ FavoritePages: [],
2779
+ SessionSampleRate: .1,
2780
+ Telemetries: []
2781
+ }
2769
2782
  },
2770
2783
  "AWS::FIS::ExperimentTemplate": { ExperimentOptions: {
2771
2784
  EmptyTargetResolutionMode: "fail",
@@ -2797,6 +2810,7 @@ const KNOWN_DEFAULTS = {
2797
2810
  "AWS::EC2::VPNGateway": { AmazonSideAsn: 64512 },
2798
2811
  "AWS::CodeGuruProfiler::ProfilingGroup": { ComputePlatform: "Default" },
2799
2812
  "AWS::ServiceCatalog::CloudFormationProduct": { ProductType: "CLOUD_FORMATION_TEMPLATE" },
2813
+ "AWS::ServiceCatalog::TagOption": { Active: true },
2800
2814
  "AWS::InternetMonitor::Monitor": { Status: "ACTIVE" },
2801
2815
  "AWS::Athena::DataCatalog": { Status: "CREATE_COMPLETE" },
2802
2816
  "AWS::RolesAnywhere::Profile": {
@@ -3112,7 +3126,10 @@ const KNOWN_DEFAULT_PATHS = {
3112
3126
  "ContentPolicyConfig.ContentFiltersTierConfig": { TierName: "CLASSIC" },
3113
3127
  "TopicPolicyConfig.TopicsTierConfig": { TierName: "CLASSIC" }
3114
3128
  },
3115
- "AWS::Synthetics::Canary": { "Schedule.RetryConfig": { MaxRetries: 0 } },
3129
+ "AWS::Synthetics::Canary": {
3130
+ "Schedule.RetryConfig": { MaxRetries: 0 },
3131
+ "Schedule.DurationInSeconds": "0"
3132
+ },
3116
3133
  "AWS::OpenSearchService::Domain": {
3117
3134
  "EBSOptions.Iops": 3e3,
3118
3135
  "EBSOptions.Throughput": 125,
@@ -3869,7 +3886,8 @@ const ELB_TG_ATTRIBUTE_DEFAULTS_BY_PROTOCOL = {
3869
3886
  };
3870
3887
  const ELB_TG_ATTRIBUTE_DEFAULTS_BY_TARGET_TYPE = {
3871
3888
  alb: { "preserve_client_ip.enabled": "true" },
3872
- ip: { "preserve_client_ip.enabled": "false" }
3889
+ ip: { "preserve_client_ip.enabled": "false" },
3890
+ instance: { "preserve_client_ip.enabled": "true" }
3873
3891
  };
3874
3892
  const SENTINEL_UNPARSEABLE = Symbol("unparseable");
3875
3893
  function deepCompareUnordered(a, b) {
@@ -5859,6 +5877,7 @@ const ELB_ATTRIBUTE_BAGS = {
5859
5877
  const notRestored = (...restoreSourceKeys) => ({ declared }) => restoreSourceKeys.every((k) => declared[k] === void 0);
5860
5878
  const MEANINGFUL_WHEN_OFF = {
5861
5879
  "AWS::KMS::Key": { Enabled: () => true },
5880
+ "AWS::ServiceCatalog::TagOption": { Active: () => true },
5862
5881
  "AWS::SQS::Queue": { SqsManagedSseEnabled: ({ declared, live }) => declared["KmsMasterKeyId"] === void 0 && live["KmsMasterKeyId"] === void 0 },
5863
5882
  "AWS::EC2::VPC": { EnableDnsSupport: () => true },
5864
5883
  "AWS::EC2::Instance": { SourceDestCheck: () => true },
@@ -17887,6 +17906,66 @@ const writeCodeBuildReportGroup = async (ctx, ops) => {
17887
17906
  ...CLIENT_TIMEOUTS
17888
17907
  }).send(new UpdateReportGroupCommand(input));
17889
17908
  };
17909
+ const CODEBUILD_PROJECT_MODIFY_PARAMS = {
17910
+ Description: "description",
17911
+ TimeoutInMinutes: "timeoutInMinutes",
17912
+ QueuedTimeoutInMinutes: "queuedTimeoutInMinutes",
17913
+ ConcurrentBuildLimit: "concurrentBuildLimit",
17914
+ AutoRetryLimit: "autoRetryLimit",
17915
+ BadgeEnabled: "badgeEnabled",
17916
+ SourceVersion: "sourceVersion",
17917
+ ServiceRole: "serviceRole",
17918
+ EncryptionKey: "encryptionKey"
17919
+ };
17920
+ const writeCodeBuildProject = async (ctx, ops) => {
17921
+ const name = str(ctx.physicalId) ?? str(ctx.declared["Name"]);
17922
+ if (!name) throw new Error("cannot resolve CodeBuild project name for revert");
17923
+ const desired = await desiredModel("AWS::CodeBuild::Project", ctx, ops);
17924
+ const input = { name };
17925
+ let any = false;
17926
+ for (const op of ops) {
17927
+ const top = op.path.replace(/^\//, "").split("/")[0] ?? "";
17928
+ const apiKey = CODEBUILD_PROJECT_MODIFY_PARAMS[top];
17929
+ if (!apiKey) continue;
17930
+ let val = desired[top];
17931
+ if (val === void 0) if (top === "Description" || top === "SourceVersion") val = "";
17932
+ else if (top === "ConcurrentBuildLimit") val = -1;
17933
+ else throw new Error(`CodeBuild Project ${top} cannot be cleared via UpdateProject (a selective modify keeps an omitted field); update it manually`);
17934
+ input[apiKey] = val;
17935
+ any = true;
17936
+ }
17937
+ if (any) await new CodeBuildClient({
17938
+ region: ctx.region,
17939
+ ...CLIENT_TIMEOUTS
17940
+ }).send(new UpdateProjectCommand(input));
17941
+ assertOpsConsumed("CodeBuild Project", ops, new Set(Object.keys(CODEBUILD_PROJECT_MODIFY_PARAMS)));
17942
+ };
17943
+ const MEDIACONVERT_QUEUE_MODIFY_PARAMS = {
17944
+ Status: "Status",
17945
+ Description: "Description"
17946
+ };
17947
+ const writeMediaConvertQueue = async (ctx, ops) => {
17948
+ const name = str(ctx.physicalId) ?? str(ctx.declared["Name"]);
17949
+ if (!name) throw new Error("cannot resolve MediaConvert queue name for revert");
17950
+ const desired = await desiredModel("AWS::MediaConvert::Queue", ctx, ops);
17951
+ const input = { Name: name };
17952
+ let any = false;
17953
+ for (const op of ops) {
17954
+ const top = op.path.replace(/^\//, "").split("/")[0] ?? "";
17955
+ const apiKey = MEDIACONVERT_QUEUE_MODIFY_PARAMS[top];
17956
+ if (!apiKey) continue;
17957
+ let val = desired[top];
17958
+ if (val === void 0) if (top === "Description") val = "";
17959
+ else throw new Error(`MediaConvert Queue ${top} cannot be cleared via UpdateQueue; update it manually`);
17960
+ input[apiKey] = val;
17961
+ any = true;
17962
+ }
17963
+ if (any) await new MediaConvertClient({
17964
+ region: ctx.region,
17965
+ ...CLIENT_TIMEOUTS
17966
+ }).send(new UpdateQueueCommand(input));
17967
+ assertOpsConsumed("MediaConvert Queue", ops, new Set(Object.keys(MEDIACONVERT_QUEUE_MODIFY_PARAMS)));
17968
+ };
17890
17969
  const DAX_CLUSTER_MODIFY_PARAMS = {
17891
17970
  Description: "Description",
17892
17971
  PreferredMaintenanceWindow: "PreferredMaintenanceWindow",
@@ -18611,7 +18690,9 @@ const SDK_WRITERS = {
18611
18690
  "AWS::ApiGatewayV2::Stage": writeApiGatewayV2Stage,
18612
18691
  "AWS::ElasticBeanstalk::Application": writeElasticBeanstalkApplication,
18613
18692
  "AWS::ElasticBeanstalk::Environment": writeElasticBeanstalkEnvironment,
18693
+ "AWS::CodeBuild::Project": writeCodeBuildProject,
18614
18694
  "AWS::CodeBuild::ReportGroup": writeCodeBuildReportGroup,
18695
+ "AWS::MediaConvert::Queue": writeMediaConvertQueue,
18615
18696
  "AWS::DAX::Cluster": writeDaxCluster,
18616
18697
  "AWS::DAX::ParameterGroup": writeDaxParameterGroup,
18617
18698
  "AWS::ElastiCache::ParameterGroup": writeElastiCacheParameterGroup,
@@ -18946,6 +19027,8 @@ const REVERT_SET_DEFAULT_PATHS = new Set([
18946
19027
  "AWS::StepFunctions::StateMachine\0LoggingConfiguration",
18947
19028
  "AWS::ApiGateway::RestApi\0DisableExecuteApiEndpoint",
18948
19029
  "AWS::Cognito::UserPoolClient\0RefreshTokenValidity",
19030
+ "AWS::RUM::AppMonitor\0CustomEvents",
19031
+ "AWS::ServiceCatalog::TagOption\0Active",
18949
19032
  "AWS::Lambda::Url\0InvokeMode",
18950
19033
  "AWS::RolesAnywhere::Profile\0DurationSeconds",
18951
19034
  "AWS::RolesAnywhere::Profile\0AttributeMappings",
@@ -18992,7 +19075,10 @@ const REVERT_SET_DEFAULT_PATHS = new Set([
18992
19075
  "AWS::ECS::Cluster\0ClusterSettings",
18993
19076
  "AWS::CloudWatch::CompositeAlarm\0ActionsEnabled",
18994
19077
  "AWS::ApiGateway::RestApi\0ApiKeySourceType",
18995
- "AWS::Glue::Crawler\0SchemaChangePolicy"
19078
+ "AWS::Glue::Crawler\0SchemaChangePolicy",
19079
+ "AWS::CodeBuild::Project\0TimeoutInMinutes",
19080
+ "AWS::CodeBuild::Project\0QueuedTimeoutInMinutes",
19081
+ "AWS::MediaConvert::Queue\0Status"
18996
19082
  ]);
18997
19083
  const REVERT_SET_DEFAULT_VALUES = {
18998
19084
  "AWS::EC2::Subnet\0EnableDns64": false,