cdk-real-drift 0.12.31 → 0.12.33

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
@@ -2451,7 +2451,9 @@ const KNOWN_DEFAULTS = {
2451
2451
  "AWS::AutoScaling::ScheduledAction": { EndTime: "null" },
2452
2452
  "AWS::DocDB::DBCluster": {
2453
2453
  Port: 27017,
2454
- BackupRetentionPeriod: 1
2454
+ BackupRetentionPeriod: 1,
2455
+ StorageType: "standard",
2456
+ NetworkType: "IPV4"
2455
2457
  },
2456
2458
  "AWS::DocDB::DBInstance": { CACertificateIdentifier: "rds-ca-rsa2048-g1" },
2457
2459
  "AWS::EC2::VolumeAttachment": { EbsCardIndex: 0 },
@@ -5816,7 +5818,10 @@ function classifyResource(resource, liveRaw, schema, opts = {}) {
5816
5818
  if (sibHooks) subtractSiblingLifecycleHooks(live, sibHooks);
5817
5819
  }
5818
5820
  if (resourceType === "AWS::EC2::EIP" && "NetworkInterfaceId" in live) {
5819
- if (physicalId !== void 0 && opts.siblingEipAssociations?.has(physicalId) || opts.siblingEipAssociations?.has(logicalId)) delete live.NetworkInterfaceId;
5821
+ const explained = physicalId !== void 0 && opts.siblingEipAssociations?.has(physicalId) || opts.siblingEipAssociations?.has(logicalId);
5822
+ const declaresTarget = (v) => v !== void 0 && v !== null && v !== "";
5823
+ const selfDeclared = declaresTarget(declared.InstanceId) || declaresTarget(declared.NetworkInterfaceId);
5824
+ if (explained || selfDeclared) delete live.NetworkInterfaceId;
5820
5825
  }
5821
5826
  if (resourceType === "AWS::S3::Bucket" && physicalId && opts.bucketNotificationManaged?.has(physicalId) && !("NotificationConfiguration" in declared)) delete live.NotificationConfiguration;
5822
5827
  const echoSpec = CLUSTER_ECHO_CHILD[resourceType];
@@ -10032,6 +10037,54 @@ const readSchedulerSchedule = async ({ physicalId, declared, region }) => {
10032
10037
  ...s.Target !== void 0 && { Target: s.Target }
10033
10038
  };
10034
10039
  };
10040
+ const projectCodeBuildSource = (src) => ({
10041
+ ...src.type !== void 0 && { Type: src.type },
10042
+ ...src.location !== void 0 && { Location: src.location },
10043
+ ...src.buildspec !== void 0 && { BuildSpec: src.buildspec },
10044
+ ...src.gitCloneDepth !== void 0 && { GitCloneDepth: src.gitCloneDepth },
10045
+ ...src.insecureSsl !== void 0 && { InsecureSsl: src.insecureSsl },
10046
+ ...src.reportBuildStatus !== void 0 && { ReportBuildStatus: src.reportBuildStatus },
10047
+ ...src.sourceIdentifier !== void 0 && { SourceIdentifier: src.sourceIdentifier }
10048
+ });
10049
+ const projectCodeBuildArtifacts = (art) => ({
10050
+ ...art.type !== void 0 && { Type: art.type },
10051
+ ...art.location !== void 0 && { Location: art.location },
10052
+ ...art.name !== void 0 && { Name: art.name },
10053
+ ...art.namespaceType !== void 0 && { NamespaceType: art.namespaceType },
10054
+ ...art.packaging !== void 0 && { Packaging: art.packaging },
10055
+ ...art.path !== void 0 && { Path: art.path },
10056
+ ...art.artifactIdentifier !== void 0 && { ArtifactIdentifier: art.artifactIdentifier },
10057
+ ...art.overrideArtifactName !== void 0 && { OverrideArtifactName: art.overrideArtifactName },
10058
+ ...art.encryptionDisabled !== void 0 && { EncryptionDisabled: art.encryptionDisabled }
10059
+ });
10060
+ const projectCodeBuildTriggers = (w) => ({
10061
+ Webhook: true,
10062
+ ...w.buildType !== void 0 && { BuildType: w.buildType },
10063
+ ...Array.isArray(w.filterGroups) && { FilterGroups: w.filterGroups.map((group) => (group ?? []).map((f) => ({
10064
+ ...f.type !== void 0 && { Type: f.type },
10065
+ ...f.pattern !== void 0 && { Pattern: f.pattern },
10066
+ ...f.excludeMatchedPattern !== void 0 && { ExcludeMatchedPattern: f.excludeMatchedPattern }
10067
+ }))) },
10068
+ ...w.scopeConfiguration && { ScopeConfiguration: {
10069
+ ...w.scopeConfiguration.name !== void 0 && { Name: w.scopeConfiguration.name },
10070
+ ...w.scopeConfiguration.domain !== void 0 && { Domain: w.scopeConfiguration.domain },
10071
+ ...w.scopeConfiguration.scope !== void 0 && { Scope: w.scopeConfiguration.scope }
10072
+ } }
10073
+ });
10074
+ const projectCodeBuildBatchConfig = (b) => ({
10075
+ ...b.serviceRole !== void 0 && { ServiceRole: b.serviceRole },
10076
+ ...b.combineArtifacts !== void 0 && { CombineArtifacts: b.combineArtifacts },
10077
+ ...b.timeoutInMins !== void 0 && { TimeoutInMins: b.timeoutInMins },
10078
+ ...b.batchReportMode !== void 0 && { BatchReportMode: b.batchReportMode },
10079
+ ...b.restrictions && { Restrictions: {
10080
+ ...b.restrictions.maximumBuildsAllowed !== void 0 && { MaximumBuildsAllowed: b.restrictions.maximumBuildsAllowed },
10081
+ ...b.restrictions.computeTypesAllowed !== void 0 && { ComputeTypesAllowed: b.restrictions.computeTypesAllowed }
10082
+ } }
10083
+ });
10084
+ const projectCodeBuildSourceVersion = (v) => ({
10085
+ ...v.sourceIdentifier !== void 0 && { SourceIdentifier: v.sourceIdentifier },
10086
+ ...v.sourceVersion !== void 0 && { SourceVersion: v.sourceVersion }
10087
+ });
10035
10088
  const readCodeBuildProject = async ({ physicalId, declared, region }) => {
10036
10089
  const name = str$1(physicalId) ?? str$1(declared.Name);
10037
10090
  if (!name) return void 0;
@@ -10046,27 +10099,11 @@ const readCodeBuildProject = async ({ physicalId, declared, region }) => {
10046
10099
  if (p.timeoutInMinutes !== void 0) model.TimeoutInMinutes = p.timeoutInMinutes;
10047
10100
  if (p.queuedTimeoutInMinutes !== void 0) model.QueuedTimeoutInMinutes = p.queuedTimeoutInMinutes;
10048
10101
  if (p.encryptionKey !== void 0) model.EncryptionKey = p.encryptionKey;
10049
- const src = p.source;
10050
- if (src) model.Source = {
10051
- ...src.type !== void 0 && { Type: src.type },
10052
- ...src.location !== void 0 && { Location: src.location },
10053
- ...src.buildspec !== void 0 && { BuildSpec: src.buildspec },
10054
- ...src.gitCloneDepth !== void 0 && { GitCloneDepth: src.gitCloneDepth },
10055
- ...src.insecureSsl !== void 0 && { InsecureSsl: src.insecureSsl },
10056
- ...src.reportBuildStatus !== void 0 && { ReportBuildStatus: src.reportBuildStatus }
10057
- };
10058
- const art = p.artifacts;
10059
- if (art) model.Artifacts = {
10060
- ...art.type !== void 0 && { Type: art.type },
10061
- ...art.location !== void 0 && { Location: art.location },
10062
- ...art.name !== void 0 && { Name: art.name },
10063
- ...art.namespaceType !== void 0 && { NamespaceType: art.namespaceType },
10064
- ...art.packaging !== void 0 && { Packaging: art.packaging },
10065
- ...art.path !== void 0 && { Path: art.path },
10066
- ...art.artifactIdentifier !== void 0 && { ArtifactIdentifier: art.artifactIdentifier },
10067
- ...art.overrideArtifactName !== void 0 && { OverrideArtifactName: art.overrideArtifactName },
10068
- ...art.encryptionDisabled !== void 0 && { EncryptionDisabled: art.encryptionDisabled }
10069
- };
10102
+ if (p.source) model.Source = projectCodeBuildSource(p.source);
10103
+ if (p.artifacts) model.Artifacts = projectCodeBuildArtifacts(p.artifacts);
10104
+ if (Array.isArray(p.secondarySources) && p.secondarySources.length > 0) model.SecondarySources = p.secondarySources.map(projectCodeBuildSource);
10105
+ if (Array.isArray(p.secondaryArtifacts) && p.secondaryArtifacts.length > 0) model.SecondaryArtifacts = p.secondaryArtifacts.map(projectCodeBuildArtifacts);
10106
+ if (Array.isArray(p.secondarySourceVersions) && p.secondarySourceVersions.length > 0) model.SecondarySourceVersions = p.secondarySourceVersions.map(projectCodeBuildSourceVersion);
10070
10107
  const env = p.environment;
10071
10108
  if (env) model.Environment = {
10072
10109
  ...env.type !== void 0 && { Type: env.type },
@@ -10121,6 +10158,9 @@ const readCodeBuildProject = async ({ physicalId, declared, region }) => {
10121
10158
  ...cache.location !== void 0 && { Location: cache.location },
10122
10159
  ...cache.modes?.length && { Modes: cache.modes }
10123
10160
  };
10161
+ if (p.webhook) model.Triggers = projectCodeBuildTriggers(p.webhook);
10162
+ if (p.buildBatchConfig) model.BuildBatchConfig = projectCodeBuildBatchConfig(p.buildBatchConfig);
10163
+ if (typeof p.autoRetryLimit === "number" && p.autoRetryLimit > 0) model.AutoRetryLimit = p.autoRetryLimit;
10124
10164
  if (Array.isArray(p.tags) && p.tags.length > 0) model.Tags = p.tags.map((t) => ({
10125
10165
  Key: t.key,
10126
10166
  Value: t.value
@@ -10220,6 +10260,13 @@ const readDocDbCluster = async ({ physicalId, declared, region, accountId }) =>
10220
10260
  if (cl.DBClusterParameterGroup !== void 0) model.DBClusterParameterGroupName = cl.DBClusterParameterGroup;
10221
10261
  const sgs = (cl.VpcSecurityGroups ?? []).map((g) => g.VpcSecurityGroupId).filter((s) => s !== void 0);
10222
10262
  if (sgs.length > 0) model.VpcSecurityGroupIds = sgs;
10263
+ if (cl.ServerlessV2ScalingConfiguration !== void 0) model.ServerlessV2ScalingConfiguration = {
10264
+ ...cl.ServerlessV2ScalingConfiguration.MinCapacity !== void 0 && { MinCapacity: cl.ServerlessV2ScalingConfiguration.MinCapacity },
10265
+ ...cl.ServerlessV2ScalingConfiguration.MaxCapacity !== void 0 && { MaxCapacity: cl.ServerlessV2ScalingConfiguration.MaxCapacity }
10266
+ };
10267
+ if (cl.StorageType !== void 0) model.StorageType = cl.StorageType;
10268
+ if (cl.NetworkType !== void 0) model.NetworkType = cl.NetworkType;
10269
+ if (cl.DBSubnetGroup !== void 0) model.DBSubnetGroupName = cl.DBSubnetGroup;
10223
10270
  const tagArn = str$1(cl.DBClusterArn) ?? (accountId && id ? `arn:${partitionForRegion(region).partition}:rds:${region}:${accountId}:cluster:${id}` : void 0);
10224
10271
  if (tagArn) await attachDocDbTags(c, tagArn, declared, model, "DBCluster");
10225
10272
  return model;