@go-to-k/cdkd 0.301.3 → 0.301.5

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.
Files changed (28) hide show
  1. package/dist/{asg-provider-Di3xOH3L.js → asg-provider-DHB498Xq.js} +2 -2
  2. package/dist/{asg-provider-Di3xOH3L.js.map → asg-provider-DHB498Xq.js.map} +1 -1
  3. package/dist/cli.js +2 -2
  4. package/dist/{deploy-engine-CZaafy9R.js → deploy-engine-HAvm8vSI.js} +24343 -24262
  5. package/dist/deploy-engine-HAvm8vSI.js.map +1 -0
  6. package/dist/iam-policy-targets-BkeM7IXi.js.map +1 -1
  7. package/dist/{iam-role-provider-De0ZPOAF.js → iam-role-provider-CTpDWSUG.js} +5 -4
  8. package/dist/iam-role-provider-CTpDWSUG.js.map +1 -0
  9. package/dist/index.d.ts +3 -10
  10. package/dist/index.d.ts.map +1 -1
  11. package/dist/index.js +2 -2
  12. package/dist/{neptune-provider-DTUriVz3.js → neptune-provider-CXhoiT-P.js} +5 -7
  13. package/dist/neptune-provider-CXhoiT-P.js.map +1 -0
  14. package/dist/{program-CYtSW-WU.js → program-DmPDfDhE.js} +152 -102
  15. package/dist/program-DmPDfDhE.js.map +1 -0
  16. package/dist/{provider-classes-59TTNMFB.js → provider-classes-DPwEHVDJ.js} +213 -230
  17. package/dist/provider-classes-DPwEHVDJ.js.map +1 -0
  18. package/dist/{rds-provider-Dadp11aB.js → rds-provider-CxB94DZy.js} +4 -4
  19. package/dist/rds-provider-CxB94DZy.js.map +1 -0
  20. package/dist/{version-Cx2pAgJv.js → version-2jeKJQlt.js} +2 -2
  21. package/dist/{version-Cx2pAgJv.js.map → version-2jeKJQlt.js.map} +1 -1
  22. package/package.json +2 -2
  23. package/dist/deploy-engine-CZaafy9R.js.map +0 -1
  24. package/dist/iam-role-provider-De0ZPOAF.js.map +0 -1
  25. package/dist/neptune-provider-DTUriVz3.js.map +0 -1
  26. package/dist/program-CYtSW-WU.js.map +0 -1
  27. package/dist/provider-classes-59TTNMFB.js.map +0 -1
  28. package/dist/rds-provider-Dadp11aB.js.map +0 -1
@@ -2,12 +2,12 @@ import { r as getAwsClients } from "./aws-clients-B_CEQGE1.js";
2
2
  import { B as safeMsg, F as displaySafe, I as displayStackName, L as isPasteableIdent, O as SECRET_REF_MAX_CODE_POINTS, P as displayIdent, a as getLogger, b as generateResourceNameWithFallback, n as isAwsAuthoredFailure, r as safeStringify, t as describeAwsFailure, y as generateResourceName, z as plainIdentOr } from "./aws-failure-text-BEQfs6za.js";
3
3
  import { $ as protectedReplacementAdvice, $n as explicitDenyPolicyKind, $t as ambientCredentialConfig, A as isQuotableImportValue, B as isTerminalDeleteFailure, C as setBounded, D as VALUE_NOT_SHOWN, E as assertRegionMatch, F as resolveExplicitPhysicalId, Fn as isInertUnquoted, H as observeThenDisableProtection, Hn as withheldTargetClause, In as pasteableCommand, Kt as injectiveKey, L as ProtectionFlipRegistry, M as quotedRemedyLogicalId, Mt as markCreatedBeforeFailure, N as refusalTypeShown, Nn as commandHole, Nt as markSupersedesEarlierCreate, O as isPlainImportJson, P as remedyLogicalId, Pn as hasClauseBreak, Q as pasteableAwsCommand, Qn as markReplayMayCollide, Qt as ambientClientDefaults, Rn as plainOrDescribed, S as replayedSendWindow, St as withDerivedNameMasks, T as RESOURCE_NOT_FOUND, Tt as clearCreatedBeforeFailure, U as protectionFlipKey, V as logGroupProtectionSite, Vn as shellQuote, W as rdsFamilyProtectionSite, X as WITHHELD_AWS_COMMAND, Y as UNNAMEABLE_ID_CLAUSE, Z as isAwsCliLiteral, Zn as markNameCollision, Zt as withPasteableAwsProfile, _ as RecentIdSet, _t as createMaskedLogSinks, a as onlySecretDerived, ar as isRetryableTransientError, at as startInterruptWatch, b as isInsideWindow, bn as ResourceUpdateNotSupportedError, bt as maskDeep, c as recordedPrincipalsRepair, cr as THROTTLING_ERROR_NAMES, ct as canonicalizeRoute53QueryName, dr as markNonRetryable, dt as compositeIdSkipResult, en as clientDefaultsFor, et as renderDisableCommand, fr as markRedactedCause, ft as logicalIdShown, g as AmbiguousCreateLatch, gt as stateOrphanRecordRemedy, h as AMBIGUOUS_LATCH_TTL_MS, ht as segmentAfterAnchor, i as holdsSecretDerivedEntry, in as CdkdError, it as isInterruptedWaitError, j as normalizeAwsTagsToCfn, jt as markAuxiliaryFailure, k as isPlainImportValue, lr as isMarkedNonRetryable, lt as compositeIdFormatMessage, nn as AccountIdUnavailableError, nr as isAmbiguousOutcomeError, o as readPrincipalLists, or as isTransientServerError, ot as ElapsedBudgetRegistry, p as withRemovalDefaults, pr as wrapMaskedAwsError, pt as packCompositeId, q as userPoolProtectionSite, qt as injectiveKeyPrefix, r as SECRET_DERIVED_READ_LIVE, rr as isExplicitDenyError, tn as credentialFingerprint, u as clearOnUpdateRemoval, ur as isThrottlingError, ut as compositeIdSeparatorRefusal, v as ambiguousAttemptLead, vn as ProvisioningError, vt as createMaskedRetryLogger, w as withoutServerErrorRetries, x as replayFollowedAmbiguousAttempt, xt as maskerOrIdentity, y as createAttemptKey, yt as isSecretDerivedValue, z as deleteWithProtectionCompensation } from "./iam-policy-targets-BkeM7IXi.js";
4
4
  import { s as ambientRegion } from "./aws-client-defaults-DBXBcg0J.js";
5
- import { $ as S3_AUTO_DELETE_OBJECTS_TAG, Ai as getAccountInfo, Ao as requireConfigString, As as recordAttributeIdCopy, Bi as parseWebACLArn, Bl as displayAssemblyPath, C as withApiLimit, Cc as rewriteTemplateAssetReferences, Co as configBooleanRefusal, Do as replayWarn, Eo as readConfigString, Fo as canonicalLambdaFunctionName, Fr as slowCcOperationTimeoutMs, G as deleteBudgetKey, Ga as refuseMalformedResourcesForDestroy, Gt as awaitInFlightSibling, H as DYNAMODB_DELETE_MIN_RESOURCE_TIMEOUT_MS, Hl as resolveAssemblyPath, Hr as withIndeterminateGuard, Ht as withNestedStackContext, Io as lambdaFunctionNameForMask, Ir as unchangedBehindSecretReference, J as DELETE_INDEX_WAIT_PROCEED_NOTE, Jr as observeThenDisableInstanceApiTermination, K as resolveDynamoDbDeleteBudgetClock, Kr as ec2InstanceProtectionSite, Lo as sameLambdaFunctionAddress, Lt as revertNestedChildFromJournal, Ns as carriesSecretMask, Ol as canonicalizeRegion, Oo as requireConfigArray, Os as recoverMaskedOutput, Po as withRetry, Pt as getNestedRevertRun, Q as ECR_AUTO_DELETE_IMAGES_TAG, S as lookupEachName, Si as s3BucketWebsiteUrl, So as coerceCfnInteger, Ss as dynamicReferenceTokens, Ta as refuseMalformedNestedChildOutputs, Tl as decodeListingKey, To as configStringRefusal, Tr as waitForLambdaFunctionActive, U as beginDeleteWait, Ui as passedParameterClassesOf, Ur as isWaitAbandonedError, V as DynamoDBGlobalTableProvider, Vl as renderAssemblyPathEscape, Vr as deleteSkipReason, Vt as getCurrentNestedStackContext, W as compensateRemovedDeletionProtection, Wr as markWaitAbandoned, X as deleteTableWithIndexBusyRetry, Xi as accountArgs, Xr as reEnableInstanceApiTermination, Xt as replacedDeleteFailureVerdict, Y as INDEX_SETTLE_POLL_INTERVAL_MS, Yo as passedNoEchoParametersOf, Yr as reDisableInstanceApiTermination, Z as waitForIndexesSettled, _o as coerceWarmThroughput$1, _r as tagPlanWarning, _s as redactSecretsForState, ao as findSilentDropProperties, b as chunks, bi as s3BucketDualStackDomainName, bo as toFiniteNumber, bs as withoutPhysicalNameCopies, c as isAbsoluteAssetPath, cr as acquireIdempotencyToken, dn as REDACTED_DELETE_ADDRESS_SKIP_REASON, dr as DBPROXY_TAGS_WHAT, et as hasCdkAutoDeleteTag, fn as isRedactedRecordedValue, fr as DBPROXY_TAG_OPTIONS, go as WARM_THROUGHPUT_MEMBERS, gr as tagMapAsList, gs as snapshotPassProvenance, hi as outputReferenceProvenanceOf, hr as refuseMalformedDesiredTags, hs as recordReferenceProvenanceEntry, ir as earliestDefined, kl as derivePartitionAndUrlSuffix, ko as requireConfigObject, kr as getCurrentResourceSecrets, ks as physicalNameCopiesOf, l as listNestedTemplateRows, ln as getCurrentProducerRegions, lr as isRefusedByName, mn as redactedDeleteAddressSkip, mr as readTagList, ms as markSameGenerationBag, ns as hasMaskableValues, nt as getPriorAttempts, or as reserveStackCreateToken, pi as isSettledInstanceState, pn as redactedDeleteAddressFields, pr as planTagDiff, q as resolveDynamoDbDeleteBudgetMs, qr as isTerminationProtectionPropagationError, qt as getStackRecords, ro as withheldAccountClause, rt as markRefusedBeforeApplying, s as findNestedTemplateTreeDefect, so as withoutSilentDropProperties, t as DeployEngine, tt as isTruthyCfnBoolean, u as renderNestedTemplateTreeDefect, ur as markDeleteStarted, vc as stringifyValue, vi as s3BucketArn, vo as isWarmThroughputDecrease, vr as definedAttributes, wo as configIntegerRefusal, x as isAccessDeniedError, xi as s3BucketRegionalDomainName, xo as coerceCfnBoolean, yi as s3BucketDomainName, yo as toCfnInteger, yr as stringifyIfAssigned, zl as describeFileReadFailure } from "./deploy-engine-CZaafy9R.js";
6
- import { n as collectInlinePolicyNamesManagedBySiblings, r as IamCreateClientCache, t as IAMRoleProvider } from "./iam-role-provider-De0ZPOAF.js";
7
- import { a as resolveSecretDerivedPrincipals, i as isResolvableSecretPrincipalList, n as runDestroyForStack, o as canonicalizeIpProtocolValue, r as holdsUnprovenSecretPrincipalToken, s as resolvedResourceTimeoutMs, t as canonicalizeIpv4Cidr } from "./program-CYtSW-WU.js";
8
- import { RDSProvider } from "./rds-provider-Dadp11aB.js";
9
- import { NeptuneProvider } from "./neptune-provider-DTUriVz3.js";
10
- import { ASGProvider } from "./asg-provider-Di3xOH3L.js";
5
+ import { $i as accountArgs, Ao as replayWarn, Bo as sameLambdaFunctionAddress, C as getPriorAttempts, Cn as awaitInFlightSibling, Co as toFiniteNumber, Dc as rewriteTemplateAssetReferences, Dn as replacedDeleteFailureVerdict, Do as configIntegerRefusal, Dr as waitForLambdaFunctionActive, Dt as withApiLimit, Eo as configBooleanRefusal, Es as dynamicReferenceTokens, Et as lookupEachName, F as listNestedTemplateRows, Gl as renderAssemblyPathEscape, Gr as isWaitAbandonedError, I as renderNestedTemplateTreeDefect, Ja as refuseMalformedResourcesForDestroy, Jr as ec2InstanceProtectionSite, Jt as redactedDeleteAddressFields, Ki as passedParameterClassesOf, Kl as resolveAssemblyPath, Kn as secretNamedAttributeNamesOf, Kr as markWaitAbandoned, Kt as REDACTED_DELETE_ADDRESS_SKIP_REASON, Lo as withRetry, Lr as slowCcOperationTimeoutMs, Ls as carriesSecretMask, Ml as canonicalizeRegion, Mo as requireConfigObject, Ms as recoverMaskedOutput, N as findNestedTemplateTreeDefect, Ni as getAccountInfo, Nl as derivePartitionAndUrlSuffix, No as requireConfigString, Ns as physicalNameCopiesOf, Oa as refuseMalformedNestedChildOutputs, Oo as configStringRefusal, P as isAbsoluteAssetPath, Ps as recordAttributeIdCopy, Qo as passedNoEchoParametersOf, Qr as reEnableInstanceApiTermination, Ro as canonicalLambdaFunctionName, Rr as unchangedBehindSecretReference, S as isTruthyCfnBoolean, Sc as stringifyValue, So as toCfnInteger, Tn as getStackRecords, To as coerceCfnInteger, Tt as isAccessDeniedError, Ui as parseWebACLArn, Ul as describeFileReadFailure, Ur as deleteSkipReason, Wl as displayAssemblyPath, Wr as withIndeterminateGuard, Wt as getCurrentProducerRegions, Xr as observeThenDisableInstanceApiTermination, Yr as isTerminationProtectionPropagationError, Yt as redactedDeleteAddressSkip, Zr as reDisableInstanceApiTermination, _ as deleteTableWithIndexBusyRetry, _r as refuseMalformedDesiredTags, ai as s3BucketDomainName, b as S3_AUTO_DELETE_OBJECTS_TAG, bo as coerceWarmThroughput$1, br as definedAttributes, bs as snapshotPassProvenance, c as DynamoDBGlobalTableProvider, ci as s3BucketWebsiteUrl, co as findSilentDropProperties, cr as reserveStackCreateToken, d as compensateRemovedDeletionProtection, dr as isRefusedByName, f as deleteBudgetKey, fr as markDeleteStarted, g as INDEX_SETTLE_POLL_INTERVAL_MS, gr as readTagList, h as DELETE_INDEX_WAIT_PROCEED_NOTE, hr as planTagDiff, ii as s3BucketArn, jo as requireConfigArray, jr as getCurrentResourceSecrets, kl as decodeListingKey, ko as readConfigString, l as DYNAMODB_DELETE_MIN_RESOURCE_TIMEOUT_MS, lt as revertNestedChildFromJournal, m as resolveDynamoDbDeleteBudgetMs, mr as DBPROXY_TAG_OPTIONS, mt as withNestedStackContext, oi as s3BucketDualStackDomainName, oo as withheldAccountClause, or as earliestDefined, os as hasMaskableValues, ot as getNestedRevertRun, p as resolveDynamoDbDeleteBudgetClock, pi as outputReferenceProvenanceOf, pr as DBPROXY_TAGS_WHAT, pt as getCurrentNestedStackContext, qt as isRedactedRecordedValue, ri as isSettledInstanceState, si as s3BucketRegionalDomainName, t as DeployEngine, u as beginDeleteWait, uo as withoutSilentDropProperties, ur as acquireIdempotencyToken, v as waitForIndexesSettled, vr as tagMapAsList, vs as markSameGenerationBag, w as markRefusedBeforeApplying, wo as coerceCfnBoolean, ws as withoutPhysicalNameCopies, wt as chunks, x as hasCdkAutoDeleteTag, xo as isWarmThroughputDecrease, xr as stringifyIfAssigned, xs as redactSecretsForState, y as ECR_AUTO_DELETE_IMAGES_TAG, yo as WARM_THROUGHPUT_MEMBERS, yr as tagPlanWarning, ys as recordReferenceProvenanceEntry, zo as lambdaFunctionNameForMask } from "./deploy-engine-HAvm8vSI.js";
6
+ import { n as collectInlinePolicyNamesManagedBySiblings, r as IamCreateClientCache, t as IAMRoleProvider } from "./iam-role-provider-CTpDWSUG.js";
7
+ import { a as resolveSecretDerivedPrincipals, i as isResolvableSecretPrincipalList, n as runDestroyForStack, o as canonicalizeIpProtocolValue, r as holdsUnprovenSecretPrincipalToken, s as resolvedResourceTimeoutMs, t as canonicalizeIpv4Cidr } from "./program-DmPDfDhE.js";
8
+ import { RDSProvider } from "./rds-provider-CxB94DZy.js";
9
+ import { NeptuneProvider } from "./neptune-provider-CXhoiT-P.js";
10
+ import { ASGProvider } from "./asg-provider-DHB498Xq.js";
11
11
  import { createHash, randomUUID } from "node:crypto";
12
12
  import { CreateBucketCommand, DeleteBucketAnalyticsConfigurationCommand, DeleteBucketCommand, DeleteBucketCorsCommand, DeleteBucketEncryptionCommand, DeleteBucketIntelligentTieringConfigurationCommand, DeleteBucketInventoryConfigurationCommand, DeleteBucketLifecycleCommand, DeleteBucketMetricsConfigurationCommand, DeleteBucketOwnershipControlsCommand, DeleteBucketPolicyCommand, DeleteBucketReplicationCommand, DeleteBucketTaggingCommand, DeleteBucketWebsiteCommand, DeleteObjectsCommand, GetBucketAccelerateConfigurationCommand, GetBucketCorsCommand, GetBucketEncryptionCommand, GetBucketLifecycleConfigurationCommand, GetBucketLocationCommand, GetBucketLoggingCommand, GetBucketNotificationConfigurationCommand, GetBucketOwnershipControlsCommand, GetBucketPolicyCommand, GetBucketReplicationCommand, GetBucketTaggingCommand, GetBucketVersioningCommand, GetBucketWebsiteCommand, GetObjectCommand, GetObjectLockConfigurationCommand, GetPublicAccessBlockCommand, HeadBucketCommand, ListBucketAnalyticsConfigurationsCommand, ListBucketIntelligentTieringConfigurationsCommand, ListBucketInventoryConfigurationsCommand, ListBucketMetricsConfigurationsCommand, ListBucketsCommand, ListObjectVersionsCommand, ListObjectsV2Command, NoSuchBucket, PutBucketAccelerateConfigurationCommand, PutBucketAnalyticsConfigurationCommand, PutBucketCorsCommand, PutBucketEncryptionCommand, PutBucketIntelligentTieringConfigurationCommand, PutBucketInventoryConfigurationCommand, PutBucketLifecycleConfigurationCommand, PutBucketLoggingCommand, PutBucketMetricsConfigurationCommand, PutBucketNotificationConfigurationCommand, PutBucketOwnershipControlsCommand, PutBucketPolicyCommand, PutBucketReplicationCommand, PutBucketTaggingCommand, PutBucketVersioningCommand, PutBucketWebsiteCommand, PutObjectLockConfigurationCommand, PutPublicAccessBlockCommand, S3Client } from "@aws-sdk/client-s3";
13
13
  import { AddRoleToInstanceProfileCommand, AddUserToGroupCommand, AttachGroupPolicyCommand, AttachRolePolicyCommand, AttachUserPolicyCommand, CreateAccessKeyCommand, CreateGroupCommand, CreateInstanceProfileCommand, CreateLoginProfileCommand, CreatePolicyCommand, CreatePolicyVersionCommand, CreateUserCommand, DeleteAccessKeyCommand, DeleteGroupCommand, DeleteGroupPolicyCommand, DeleteInstanceProfileCommand, DeleteLoginProfileCommand, DeletePolicyCommand, DeletePolicyVersionCommand, DeleteRolePolicyCommand, DeleteUserCommand, DeleteUserPermissionsBoundaryCommand, DeleteUserPolicyCommand, DetachGroupPolicyCommand, DetachRolePolicyCommand, DetachUserPolicyCommand, GetAccessKeyLastUsedCommand, GetGroupCommand, GetGroupPolicyCommand, GetInstanceProfileCommand, GetPolicyCommand, GetPolicyVersionCommand, GetRolePolicyCommand, GetUserCommand, GetUserPolicyCommand, IAMClient, ListAccessKeysCommand, ListAttachedGroupPoliciesCommand, ListAttachedUserPoliciesCommand, ListEntitiesForPolicyCommand, ListGroupPoliciesCommand, ListGroupsForUserCommand, ListPoliciesCommand, ListPolicyTagsCommand, ListPolicyVersionsCommand, ListUserPoliciesCommand, NoSuchEntityException, PutGroupPolicyCommand, PutRolePolicyCommand, PutUserPermissionsBoundaryCommand, PutUserPolicyCommand, RemoveRoleFromInstanceProfileCommand, RemoveUserFromGroupCommand, TagPolicyCommand, TagUserCommand, UntagPolicyCommand, UntagUserCommand, UpdateAccessKeyCommand, UpdateLoginProfileCommand } from "@aws-sdk/client-iam";
@@ -5707,10 +5707,7 @@ const SQS_ATTRIBUTE_REMOVAL_RESET = {
5707
5707
  DelaySeconds: "0",
5708
5708
  ReceiveMessageWaitTimeSeconds: "0",
5709
5709
  KmsDataKeyReusePeriodSeconds: "300",
5710
- ContentBasedDeduplication: "false",
5711
- SqsManagedSseEnabled: "true",
5712
- DeduplicationScope: "queue",
5713
- FifoThroughputLimit: "perQueue"
5710
+ ContentBasedDeduplication: "false"
5714
5711
  };
5715
5712
  const CDK_TO_SQS_ATTRIBUTES = {
5716
5713
  VisibilityTimeout: "VisibilityTimeout",
@@ -5824,13 +5821,7 @@ var SQSQueueProvider = class {
5824
5821
  if (cdkKey === "RedrivePolicy" && typeof value === "object") attributes[sqsKey] = serializeRedrivePolicy(value);
5825
5822
  else if (cdkKey === "RedriveAllowPolicy") attributes[sqsKey] = serializeRedriveAllowPolicy(value);
5826
5823
  else attributes[sqsKey] = stringifyValue(value);
5827
- } else if (previousProperties[cdkKey] !== void 0 && cdkKey in SQS_ATTRIBUTE_REMOVAL_RESET) {
5828
- if (cdkKey === "SqsManagedSseEnabled") {
5829
- const desiredKmsKey = properties["KmsMasterKeyId"];
5830
- if (desiredKmsKey !== void 0 && desiredKmsKey !== "") continue;
5831
- }
5832
- attributes[sqsKey] = SQS_ATTRIBUTE_REMOVAL_RESET[cdkKey];
5833
- }
5824
+ } else if (previousProperties[cdkKey] !== void 0 && cdkKey in SQS_ATTRIBUTE_REMOVAL_RESET) attributes[sqsKey] = SQS_ATTRIBUTE_REMOVAL_RESET[cdkKey];
5834
5825
  }
5835
5826
  if (Object.keys(attributes).length > 0) {
5836
5827
  await this.sqsClient.send(new SetQueueAttributesCommand({
@@ -8875,7 +8866,7 @@ var LambdaUrlProvider = class {
8875
8866
  FunctionName: physicalId,
8876
8867
  ...authType !== void 0 && { AuthType: authType }
8877
8868
  };
8878
- const invokeMode = clearOnUpdateRemoval(properties["InvokeMode"], previousProperties["InvokeMode"], "BUFFERED");
8869
+ const invokeMode = properties["InvokeMode"];
8879
8870
  if (invokeMode !== void 0) updateParams.InvokeMode = invokeMode;
8880
8871
  const newCorsRaw = properties["Cors"];
8881
8872
  const prevCorsRaw = previousProperties["Cors"];
@@ -14377,7 +14368,6 @@ var SecretsManagerSecretProvider = class {
14377
14368
  "ReplicaRegions",
14378
14369
  "Type"
14379
14370
  ])]]);
14380
- removalDefaults = /* @__PURE__ */ new Map([["AWS::SecretsManager::Secret", /* @__PURE__ */ new Map([["Description", ""]])]]);
14381
14371
  constructor() {
14382
14372
  const awsClients = getAwsClients();
14383
14373
  this.smClient = awsClients.secretsManager;
@@ -14422,7 +14412,6 @@ var SecretsManagerSecretProvider = class {
14422
14412
  }
14423
14413
  }
14424
14414
  async update(logicalId, physicalId, resourceType, properties, previousProperties, context) {
14425
- properties = withRemovalDefaults(this.removalDefaults, resourceType, properties, previousProperties, context);
14426
14415
  const log = this.operationSinks(context?.maskSecrets, [
14427
14416
  [properties["Name"], properties["Name"]],
14428
14417
  [properties["Name"], physicalId],
@@ -14447,7 +14436,7 @@ var SecretsManagerSecretProvider = class {
14447
14436
  if (description !== void 0) updateParams.Description = description;
14448
14437
  const newKmsKeyId = properties["KmsKeyId"];
14449
14438
  const prevKmsKeyId = previousProperties["KmsKeyId"];
14450
- const kmsKeyId = clearOnUpdateRemoval(newKmsKeyId === "" ? void 0 : newKmsKeyId, prevKmsKeyId === "" ? void 0 : prevKmsKeyId, "");
14439
+ const kmsKeyId = newKmsKeyId === void 0 ? void 0 : newKmsKeyId === "" ? prevKmsKeyId !== void 0 && prevKmsKeyId !== "" ? "" : void 0 : newKmsKeyId;
14451
14440
  if (kmsKeyId !== void 0) updateParams.KmsKeyId = kmsKeyId;
14452
14441
  if (properties["Type"]) updateParams.Type = properties["Type"];
14453
14442
  await this.smClient.send(new UpdateSecretCommand(updateParams));
@@ -20758,9 +20747,9 @@ var ApiGatewayV2Provider = class {
20758
20747
  const log = resourceType === "AWS::ApiGatewayV2::Stage" ? stageSinks(this.logger, context, [[properties["StageName"], physicalId], [previousProperties["StageName"], physicalId]]) : createMaskedLogSinks(this.logger, context?.maskSecrets);
20759
20748
  switch (resourceType) {
20760
20749
  case "AWS::ApiGatewayV2::Api": return this.updateApi(logicalId, physicalId, resourceType, properties, previousProperties, log);
20761
- case "AWS::ApiGatewayV2::Stage": return this.updateStage(logicalId, physicalId, resourceType, properties, previousProperties, log);
20762
- case "AWS::ApiGatewayV2::Integration": return this.updateIntegration(logicalId, physicalId, resourceType, properties, previousProperties, log);
20763
- case "AWS::ApiGatewayV2::Route": return this.updateRoute(logicalId, physicalId, resourceType, properties, previousProperties, log);
20750
+ case "AWS::ApiGatewayV2::Stage": return this.updateStage(logicalId, physicalId, resourceType, properties, previousProperties, log, context?.desiredFromAwsReadback === true);
20751
+ case "AWS::ApiGatewayV2::Integration": return this.updateIntegration(logicalId, physicalId, resourceType, properties, previousProperties, log, context?.desiredFromAwsReadback === true);
20752
+ case "AWS::ApiGatewayV2::Route": return this.updateRoute(logicalId, physicalId, resourceType, properties, previousProperties, log, context?.desiredFromAwsReadback === true);
20764
20753
  case "AWS::ApiGatewayV2::Authorizer": return this.updateAuthorizer(logicalId, physicalId, resourceType, properties, previousProperties, log);
20765
20754
  default: throw new ResourceUpdateNotSupportedError(resourceType, logicalId, "Unsupported API Gateway V2 resource type for in-place update in cdkd; re-deploy with cdkd deploy --replace, or destroy + redeploy the stack.");
20766
20755
  }
@@ -21366,49 +21355,34 @@ var ApiGatewayV2Provider = class {
21366
21355
  input.Name = properties["Name"];
21367
21356
  changed = true;
21368
21357
  }
21369
- {
21370
- const r = this.clearableUpdate(properties["Description"], previousProperties["Description"], "");
21371
- if (r.changed) {
21372
- input.Description = r.value;
21373
- changed = true;
21374
- }
21358
+ if (properties["Description"] !== void 0 && properties["Description"] !== previousProperties["Description"]) {
21359
+ input.Description = properties["Description"];
21360
+ changed = true;
21375
21361
  }
21376
21362
  if (properties["CorsConfiguration"] !== void 0 && !this.deepEqual(properties["CorsConfiguration"], previousProperties["CorsConfiguration"])) {
21377
21363
  input.CorsConfiguration = properties["CorsConfiguration"];
21378
21364
  changed = true;
21379
21365
  }
21380
21366
  const corsRemoved = properties["CorsConfiguration"] === void 0 && previousProperties["CorsConfiguration"] !== void 0;
21381
- {
21382
- const r = this.clearableUpdate(properties["DisableExecuteApiEndpoint"], previousProperties["DisableExecuteApiEndpoint"], false);
21383
- if (r.changed) {
21384
- input.DisableExecuteApiEndpoint = r.value;
21385
- changed = true;
21386
- }
21367
+ if (properties["DisableExecuteApiEndpoint"] !== void 0 && properties["DisableExecuteApiEndpoint"] !== previousProperties["DisableExecuteApiEndpoint"]) {
21368
+ input.DisableExecuteApiEndpoint = properties["DisableExecuteApiEndpoint"];
21369
+ changed = true;
21387
21370
  }
21388
- {
21389
- const r = this.clearableUpdate(properties["Version"], previousProperties["Version"], "");
21390
- if (r.changed) {
21391
- input.Version = r.value;
21392
- changed = true;
21393
- }
21371
+ if (properties["Version"] !== void 0 && properties["Version"] !== previousProperties["Version"]) {
21372
+ input.Version = properties["Version"];
21373
+ changed = true;
21394
21374
  }
21395
21375
  if (properties["RouteSelectionExpression"] !== void 0 && properties["RouteSelectionExpression"] !== previousProperties["RouteSelectionExpression"]) {
21396
21376
  input.RouteSelectionExpression = properties["RouteSelectionExpression"];
21397
21377
  changed = true;
21398
21378
  }
21399
- {
21400
- const r = this.clearableUpdate(properties["ApiKeySelectionExpression"], previousProperties["ApiKeySelectionExpression"], "$request.header.x-api-key");
21401
- if (r.changed) {
21402
- input.ApiKeySelectionExpression = r.value;
21403
- changed = true;
21404
- }
21379
+ if (properties["ApiKeySelectionExpression"] !== void 0 && properties["ApiKeySelectionExpression"] !== previousProperties["ApiKeySelectionExpression"]) {
21380
+ input.ApiKeySelectionExpression = properties["ApiKeySelectionExpression"];
21381
+ changed = true;
21405
21382
  }
21406
- {
21407
- const r = this.clearableUpdate(properties["IpAddressType"], previousProperties["IpAddressType"], "ipv4");
21408
- if (r.changed) {
21409
- input.IpAddressType = r.value;
21410
- changed = true;
21411
- }
21383
+ if (properties["IpAddressType"] !== void 0 && properties["IpAddressType"] !== previousProperties["IpAddressType"]) {
21384
+ input.IpAddressType = properties["IpAddressType"];
21385
+ changed = true;
21412
21386
  }
21413
21387
  if (!changed && !corsRemoved) {
21414
21388
  log.debug(`No mutable Api fields changed for ${logicalId}; skipping UpdateApi`);
@@ -21447,7 +21421,7 @@ var ApiGatewayV2Provider = class {
21447
21421
  throw this.wrapMaskedError(log, error, (text) => new ProvisioningError(`Failed to update API Gateway V2 Api ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
21448
21422
  }
21449
21423
  }
21450
- async updateStage(logicalId, physicalId, resourceType, properties, previousProperties, log) {
21424
+ async updateStage(logicalId, physicalId, resourceType, properties, previousProperties, log, restoreFromAws = false) {
21451
21425
  const apiId = properties["ApiId"] ?? previousProperties["ApiId"];
21452
21426
  if (!apiId) throw new ProvisioningError(`ApiId is required to update Stage ${logicalId}`, resourceType, logicalId, physicalId);
21453
21427
  if (properties["ApiId"] !== void 0 && previousProperties["ApiId"] !== void 0 && properties["ApiId"] !== previousProperties["ApiId"]) throw new ResourceUpdateNotSupportedError(resourceType, logicalId, "ApiId is immutable on AWS::ApiGatewayV2::Stage; re-deploy with cdkd deploy --replace");
@@ -21474,12 +21448,15 @@ var ApiGatewayV2Provider = class {
21474
21448
  input.Description = properties["Description"];
21475
21449
  changed = true;
21476
21450
  }
21477
- {
21451
+ if (restoreFromAws) {
21478
21452
  const merged = this.mapWithRemovals(properties["StageVariables"], previousProperties["StageVariables"]);
21479
21453
  if (merged !== void 0) {
21480
21454
  input.StageVariables = merged;
21481
21455
  changed = true;
21482
21456
  }
21457
+ } else if (this.mapEntryAddedOrChanged(properties["StageVariables"], previousProperties["StageVariables"])) {
21458
+ input.StageVariables = properties["StageVariables"];
21459
+ changed = true;
21483
21460
  }
21484
21461
  if (properties["DefaultRouteSettings"] !== void 0 && !this.deepEqual(properties["DefaultRouteSettings"], previousProperties["DefaultRouteSettings"])) {
21485
21462
  input.DefaultRouteSettings = properties["DefaultRouteSettings"];
@@ -21495,12 +21472,9 @@ var ApiGatewayV2Provider = class {
21495
21472
  changed = true;
21496
21473
  }
21497
21474
  const droppedRouteSettingKeys = this.droppedKeys(properties["RouteSettings"], previousProperties["RouteSettings"]);
21498
- {
21499
- const r = this.clearableUpdate(properties["ClientCertificateId"], previousProperties["ClientCertificateId"], "");
21500
- if (r.changed) {
21501
- input.ClientCertificateId = r.value;
21502
- changed = true;
21503
- }
21475
+ if (properties["ClientCertificateId"] !== void 0 && properties["ClientCertificateId"] !== previousProperties["ClientCertificateId"]) {
21476
+ input.ClientCertificateId = properties["ClientCertificateId"];
21477
+ changed = true;
21504
21478
  }
21505
21479
  if (properties["DeploymentId"] !== void 0 && properties["DeploymentId"] !== previousProperties["DeploymentId"]) {
21506
21480
  input.DeploymentId = properties["DeploymentId"];
@@ -21538,7 +21512,7 @@ var ApiGatewayV2Provider = class {
21538
21512
  throw this.wrapMaskedError(log, error, (text) => new ProvisioningError(`Failed to update API Gateway V2 Stage ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
21539
21513
  }
21540
21514
  }
21541
- async updateIntegration(logicalId, physicalId, resourceType, properties, previousProperties, log) {
21515
+ async updateIntegration(logicalId, physicalId, resourceType, properties, previousProperties, log, restoreFromAws = false) {
21542
21516
  const apiId = properties["ApiId"] ?? previousProperties["ApiId"];
21543
21517
  if (!apiId) throw new ProvisioningError(`ApiId is required to update Integration ${logicalId}`, resourceType, logicalId, physicalId);
21544
21518
  if (properties["ApiId"] !== void 0 && previousProperties["ApiId"] !== void 0 && properties["ApiId"] !== previousProperties["ApiId"]) throw new ResourceUpdateNotSupportedError(resourceType, logicalId, "ApiId is immutable on AWS::ApiGatewayV2::Integration; re-deploy with cdkd deploy --replace");
@@ -21567,19 +21541,19 @@ var ApiGatewayV2Provider = class {
21567
21541
  input.TimeoutInMillis = properties["TimeoutInMillis"];
21568
21542
  changed = true;
21569
21543
  }
21570
- {
21544
+ if (restoreFromAws) {
21571
21545
  const merged = this.mapWithRemovals(properties["RequestParameters"], previousProperties["RequestParameters"]);
21572
21546
  if (merged !== void 0) {
21573
21547
  input.RequestParameters = merged;
21574
21548
  changed = true;
21575
21549
  }
21550
+ } else if (this.mapEntryAddedOrChanged(properties["RequestParameters"], previousProperties["RequestParameters"])) {
21551
+ input.RequestParameters = properties["RequestParameters"];
21552
+ changed = true;
21576
21553
  }
21577
- {
21578
- const r = this.clearableUpdate(properties["Description"], previousProperties["Description"], "");
21579
- if (r.changed) {
21580
- input.Description = r.value;
21581
- changed = true;
21582
- }
21554
+ if (properties["Description"] !== void 0 && properties["Description"] !== previousProperties["Description"]) {
21555
+ input.Description = properties["Description"];
21556
+ changed = true;
21583
21557
  }
21584
21558
  if (properties["ConnectionId"] != null && properties["ConnectionId"] !== previousProperties["ConnectionId"]) {
21585
21559
  input.ConnectionId = properties["ConnectionId"];
@@ -21645,7 +21619,7 @@ var ApiGatewayV2Provider = class {
21645
21619
  throw this.wrapMaskedError(log, error, (text) => new ProvisioningError(`Failed to update API Gateway V2 Integration ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
21646
21620
  }
21647
21621
  }
21648
- async updateRoute(logicalId, physicalId, resourceType, properties, previousProperties, log) {
21622
+ async updateRoute(logicalId, physicalId, resourceType, properties, previousProperties, log, restoreFromAws = false) {
21649
21623
  const apiId = properties["ApiId"] ?? previousProperties["ApiId"];
21650
21624
  if (!apiId) throw new ProvisioningError(`ApiId is required to update Route ${logicalId}`, resourceType, logicalId, physicalId);
21651
21625
  if (properties["ApiId"] !== void 0 && previousProperties["ApiId"] !== void 0 && properties["ApiId"] !== previousProperties["ApiId"]) throw new ResourceUpdateNotSupportedError(resourceType, logicalId, "ApiId is immutable on AWS::ApiGatewayV2::Route; re-deploy with cdkd deploy --replace");
@@ -21662,19 +21636,13 @@ var ApiGatewayV2Provider = class {
21662
21636
  input.Target = properties["Target"];
21663
21637
  changed = true;
21664
21638
  }
21665
- {
21666
- const r = this.clearableUpdate(properties["AuthorizationType"], previousProperties["AuthorizationType"], "NONE");
21667
- if (r.changed) {
21668
- input.AuthorizationType = r.value;
21669
- changed = true;
21670
- }
21639
+ if (properties["AuthorizationType"] !== void 0 && properties["AuthorizationType"] !== previousProperties["AuthorizationType"]) {
21640
+ input.AuthorizationType = properties["AuthorizationType"];
21641
+ changed = true;
21671
21642
  }
21672
- {
21673
- const r = this.clearableUpdate(properties["AuthorizerId"], previousProperties["AuthorizerId"], "");
21674
- if (r.changed) {
21675
- input.AuthorizerId = r.value;
21676
- changed = true;
21677
- }
21643
+ if (properties["AuthorizerId"] !== void 0 && properties["AuthorizerId"] !== previousProperties["AuthorizerId"]) {
21644
+ input.AuthorizerId = properties["AuthorizerId"];
21645
+ changed = true;
21678
21646
  }
21679
21647
  {
21680
21648
  const r = this.clearableUpdate(properties["AuthorizationScopes"], previousProperties["AuthorizationScopes"], []);
@@ -21683,12 +21651,9 @@ var ApiGatewayV2Provider = class {
21683
21651
  changed = true;
21684
21652
  }
21685
21653
  }
21686
- {
21687
- const r = this.clearableUpdate(properties["OperationName"], previousProperties["OperationName"], "");
21688
- if (r.changed) {
21689
- input.OperationName = r.value;
21690
- changed = true;
21691
- }
21654
+ if (properties["OperationName"] !== void 0 && properties["OperationName"] !== previousProperties["OperationName"]) {
21655
+ input.OperationName = properties["OperationName"];
21656
+ changed = true;
21692
21657
  }
21693
21658
  {
21694
21659
  const r = this.clearableUpdate(properties["ApiKeyRequired"], previousProperties["ApiKeyRequired"], false);
@@ -21697,18 +21662,21 @@ var ApiGatewayV2Provider = class {
21697
21662
  changed = true;
21698
21663
  }
21699
21664
  }
21700
- {
21665
+ if (restoreFromAws) {
21701
21666
  const merged = this.mapWithRemovals(properties["RequestModels"], previousProperties["RequestModels"]);
21702
21667
  if (merged !== void 0) {
21703
21668
  input.RequestModels = merged;
21704
21669
  changed = true;
21705
21670
  }
21671
+ } else if (this.mapEntryAddedOrChanged(properties["RequestModels"], previousProperties["RequestModels"])) {
21672
+ input.RequestModels = properties["RequestModels"];
21673
+ changed = true;
21706
21674
  }
21707
- if (properties["RequestParameters"] !== void 0 && !this.deepEqual(properties["RequestParameters"], previousProperties["RequestParameters"])) {
21675
+ if (restoreFromAws ? properties["RequestParameters"] !== void 0 && !this.deepEqual(properties["RequestParameters"], previousProperties["RequestParameters"]) : this.mapEntryAddedOrChanged(properties["RequestParameters"], previousProperties["RequestParameters"])) {
21708
21676
  input.RequestParameters = properties["RequestParameters"];
21709
21677
  changed = true;
21710
21678
  }
21711
- const droppedRequestParameterKeys = this.droppedKeys(properties["RequestParameters"], previousProperties["RequestParameters"]);
21679
+ const droppedRequestParameterKeys = restoreFromAws ? this.droppedKeys(properties["RequestParameters"], previousProperties["RequestParameters"]) : [];
21712
21680
  if (properties["ModelSelectionExpression"] !== void 0 && properties["ModelSelectionExpression"] !== previousProperties["ModelSelectionExpression"]) {
21713
21681
  input.ModelSelectionExpression = properties["ModelSelectionExpression"];
21714
21682
  changed = true;
@@ -21782,37 +21750,25 @@ var ApiGatewayV2Provider = class {
21782
21750
  input.AuthorizerUri = properties["AuthorizerUri"];
21783
21751
  changed = true;
21784
21752
  }
21785
- {
21786
- const r = this.clearableUpdate(properties["AuthorizerCredentialsArn"], previousProperties["AuthorizerCredentialsArn"], "");
21787
- if (r.changed) {
21788
- input.AuthorizerCredentialsArn = r.value;
21789
- changed = true;
21790
- }
21753
+ if (properties["AuthorizerCredentialsArn"] !== void 0 && properties["AuthorizerCredentialsArn"] !== previousProperties["AuthorizerCredentialsArn"]) {
21754
+ input.AuthorizerCredentialsArn = properties["AuthorizerCredentialsArn"];
21755
+ changed = true;
21791
21756
  }
21792
- {
21793
- const r = this.clearableUpdate(properties["AuthorizerPayloadFormatVersion"], previousProperties["AuthorizerPayloadFormatVersion"], "");
21794
- if (r.changed) {
21795
- input.AuthorizerPayloadFormatVersion = r.value;
21796
- changed = true;
21797
- }
21757
+ if (properties["AuthorizerPayloadFormatVersion"] !== void 0 && properties["AuthorizerPayloadFormatVersion"] !== previousProperties["AuthorizerPayloadFormatVersion"]) {
21758
+ input.AuthorizerPayloadFormatVersion = properties["AuthorizerPayloadFormatVersion"];
21759
+ changed = true;
21798
21760
  }
21799
- {
21800
- const r = this.clearableUpdate(properties["AuthorizerResultTtlInSeconds"], previousProperties["AuthorizerResultTtlInSeconds"], 0);
21801
- if (r.changed) {
21802
- input.AuthorizerResultTtlInSeconds = r.value;
21803
- changed = true;
21804
- }
21761
+ if (properties["AuthorizerResultTtlInSeconds"] !== void 0 && properties["AuthorizerResultTtlInSeconds"] !== previousProperties["AuthorizerResultTtlInSeconds"]) {
21762
+ input.AuthorizerResultTtlInSeconds = properties["AuthorizerResultTtlInSeconds"];
21763
+ changed = true;
21805
21764
  }
21806
21765
  if (properties["EnableSimpleResponses"] !== void 0 && properties["EnableSimpleResponses"] !== previousProperties["EnableSimpleResponses"]) {
21807
21766
  input.EnableSimpleResponses = properties["EnableSimpleResponses"];
21808
21767
  changed = true;
21809
21768
  }
21810
- {
21811
- const r = this.clearableUpdate(properties["IdentityValidationExpression"], previousProperties["IdentityValidationExpression"], "");
21812
- if (r.changed) {
21813
- input.IdentityValidationExpression = r.value;
21814
- changed = true;
21815
- }
21769
+ if (properties["IdentityValidationExpression"] !== void 0 && properties["IdentityValidationExpression"] !== previousProperties["IdentityValidationExpression"]) {
21770
+ input.IdentityValidationExpression = properties["IdentityValidationExpression"];
21771
+ changed = true;
21816
21772
  }
21817
21773
  if (!changed) {
21818
21774
  log.debug(`No mutable Authorizer fields changed for ${logicalId}; skipping UpdateAuthorizer`);
@@ -21880,6 +21836,11 @@ var ApiGatewayV2Provider = class {
21880
21836
  for (const key of Object.keys(prevMap)) if (!Object.hasOwn(nextMap, key)) merged[key] = "";
21881
21837
  return merged;
21882
21838
  }
21839
+ mapEntryAddedOrChanged(next, previous) {
21840
+ if (next == null || typeof next !== "object" || Array.isArray(next)) return false;
21841
+ const prevMap = previous != null && typeof previous === "object" && !Array.isArray(previous) ? previous : {};
21842
+ return Object.entries(next).some(([key, value]) => !Object.prototype.hasOwnProperty.call(prevMap, key) || !this.deepEqual(value, prevMap[key]));
21843
+ }
21883
21844
  warnTlsConfigIgnoredIfPublic(logicalId, properties, log) {
21884
21845
  if (properties["TlsConfig"] != null && properties["ConnectionType"] !== "VPC_LINK") log.warn(`AWS::ApiGatewayV2::Integration ${logicalId}: TlsConfig is only honored on a VPC_LINK (private) integration — AWS silently ignores it on a public one, and the value will never be readable back from AWS.`);
21885
21846
  }
@@ -25293,35 +25254,9 @@ function targetsSecretCause(read) {
25293
25254
  return read.kind === "malformed" && read.onlySecret ? " (an Id holds a dynamic reference or its mask, which names no target Elastic Load Balancing accepts)" : "";
25294
25255
  }
25295
25256
  const TARGETS_WHAT = "targets, each with a string Id and, where given, an integer Port and a string AvailabilityZone";
25296
- const TARGET_GROUP_ATTRIBUTE_DEFAULTS = {
25297
- "deregistration_delay.timeout_seconds": "300",
25298
- "deregistration_delay.connection_termination.enabled": "false",
25299
- "stickiness.enabled": "false",
25300
- "stickiness.lb_cookie.duration_seconds": "86400",
25301
- "stickiness.app_cookie.duration_seconds": "86400",
25302
- "load_balancing.algorithm.type": "round_robin",
25303
- "load_balancing.algorithm.anomaly_mitigation": "off",
25304
- "load_balancing.cross_zone.enabled": "use_load_balancer_configuration",
25305
- "slow_start.duration_seconds": "0",
25306
- "lambda.multi_value_headers.enabled": "false",
25307
- "proxy_protocol_v2.enabled": "false"
25308
- };
25309
- const LOAD_BALANCER_ATTRIBUTE_DEFAULTS = {
25310
- "deletion_protection.enabled": "false",
25311
- "access_logs.s3.enabled": "false",
25312
- "connection_logs.s3.enabled": "false",
25313
- "health_check_logs.s3.enabled": "false",
25314
- "routing.http.desync_mitigation_mode": "defensive",
25315
- "routing.http.drop_invalid_header_fields.enabled": "false",
25316
- "routing.http.preserve_host_header.enabled": "false",
25317
- "routing.http.x_amzn_tls_version_and_cipher_suite.enabled": "false",
25318
- "routing.http.xff_client_port.enabled": "false",
25319
- "routing.http.xff_header_processing.mode": "append",
25320
- "routing.http2.enabled": "true",
25321
- "waf.fail_open.enabled": "false",
25322
- "zonal_shift.config.enabled": "false"
25323
- };
25324
- const LISTENER_ATTRIBUTE_DEFAULTS = { "routing.http.response.server.enabled": "true" };
25257
+ const RETAIN_REMOVED_ATTRIBUTE = () => void 0;
25258
+ const LOG_DELIVERY_ATTRIBUTE = /^[a-z_]+_logs\.s3\./;
25259
+ const MISLEADING_IF_KEPT_ATTRIBUTE = /^routing\.http\.(response\.access_control_|request\.[a-z0-9_]+\.header_name$)/;
25325
25260
  function loadBalancerAttributes(lb, lbArn) {
25326
25261
  return definedAttributes({
25327
25262
  DNSName: lb.DNSName,
@@ -25452,13 +25387,53 @@ var ELBv2Provider = class {
25452
25387
  "Tags"
25453
25388
  ])]
25454
25389
  ]);
25455
- removalHandledInUpdate = /* @__PURE__ */ new Map([["AWS::ElasticLoadBalancingV2::Listener", /* @__PURE__ */ new Set([
25456
- "LoadBalancerArn",
25457
- "DefaultActions",
25458
- "ListenerAttributes",
25459
- "Tags",
25460
- ...LISTENER_LEFT_IN_PLACE_ON_REMOVAL
25461
- ])]]);
25390
+ removalHandledInUpdate = /* @__PURE__ */ new Map([
25391
+ ["AWS::ElasticLoadBalancingV2::LoadBalancer", /* @__PURE__ */ new Set([
25392
+ "Name",
25393
+ "Scheme",
25394
+ "Type",
25395
+ "Subnets",
25396
+ "SubnetMappings",
25397
+ "SecurityGroups",
25398
+ "Tags",
25399
+ "IpAddressType",
25400
+ "Ipv4IpamPoolId",
25401
+ "MinimumLoadBalancerCapacity",
25402
+ "EnableCapacityReservationProvisionStabilize",
25403
+ "LoadBalancerAttributes",
25404
+ "EnablePrefixForIpv6SourceNat",
25405
+ "EnforceSecurityGroupInboundRulesOnPrivateLinkTraffic"
25406
+ ])],
25407
+ ["AWS::ElasticLoadBalancingV2::TargetGroup", /* @__PURE__ */ new Set([
25408
+ "Protocol",
25409
+ "Port",
25410
+ "VpcId",
25411
+ "TargetType",
25412
+ "ProtocolVersion",
25413
+ "Name",
25414
+ "IpAddressType",
25415
+ "TargetControlPort",
25416
+ "HealthCheckPort",
25417
+ "Targets",
25418
+ "Tags",
25419
+ "HealthCheckProtocol",
25420
+ "HealthCheckPath",
25421
+ "HealthCheckEnabled",
25422
+ "HealthCheckIntervalSeconds",
25423
+ "HealthCheckTimeoutSeconds",
25424
+ "HealthyThresholdCount",
25425
+ "UnhealthyThresholdCount",
25426
+ "Matcher",
25427
+ "TargetGroupAttributes"
25428
+ ])],
25429
+ ["AWS::ElasticLoadBalancingV2::Listener", /* @__PURE__ */ new Set([
25430
+ "LoadBalancerArn",
25431
+ "DefaultActions",
25432
+ "ListenerAttributes",
25433
+ "Tags",
25434
+ ...LISTENER_LEFT_IN_PLACE_ON_REMOVAL
25435
+ ])]
25436
+ ]);
25462
25437
  lambdaClients = /* @__PURE__ */ new Map();
25463
25438
  getClient() {
25464
25439
  if (!this.elbv2Client) this.elbv2Client = new ElasticLoadBalancingV2Client({
@@ -25720,7 +25695,11 @@ var ELBv2Provider = class {
25720
25695
  }) : "For Name / Type / Scheme re-deploy with cdkd deploy --replace, or destroy + redeploy the stack.";
25721
25696
  throw new ResourceUpdateNotSupportedError("AWS::ElasticLoadBalancingV2::LoadBalancer", logicalId, "ELBv2 LoadBalancer Name / Type / Scheme are immutable on AWS — none of the ELBv2 Modify* / Set* APIs accept these fields; they are fixed at creation. cdkd handles LoadBalancerAttributes / Subnets / SubnetMappings / SecurityGroups / IpAddressType / Tags in-place. " + remedy);
25722
25697
  }
25723
- const submittedAttrs = this.diffAttributeBag("LoadBalancerAttributes", logicalId, properties["LoadBalancerAttributes"], previousProperties["LoadBalancerAttributes"], this.attributeRemovalResolver(LOAD_BALANCER_ATTRIBUTE_DEFAULTS), fromReadback, maskSecrets);
25698
+ const removedLogKeys = [];
25699
+ const submittedAttrs = this.diffAttributeBag("LoadBalancerAttributes", logicalId, properties["LoadBalancerAttributes"], previousProperties["LoadBalancerAttributes"], (key) => {
25700
+ if (LOG_DELIVERY_ATTRIBUTE.test(key)) removedLogKeys.push(key);
25701
+ return RETAIN_REMOVED_ATTRIBUTE();
25702
+ }, fromReadback, maskSecrets);
25724
25703
  if (submittedAttrs.length > 0) {
25725
25704
  await this.getClient().send(new ModifyLoadBalancerAttributesCommand({
25726
25705
  LoadBalancerArn: physicalId,
@@ -25728,6 +25707,14 @@ var ELBv2Provider = class {
25728
25707
  }));
25729
25708
  this.logger.debug(`Applied ${submittedAttrs.length} LoadBalancerAttributes change(s) for ${logicalId}`);
25730
25709
  }
25710
+ const desiredAttrs = new Map(this.normalizeAttributes(properties["LoadBalancerAttributes"]).map((a) => [a.Key, a.Value]));
25711
+ const exposedLogKeys = removedLogKeys.filter((key) => desiredAttrs.get(`${key.split(".")[0]}.s3.enabled`) !== "false");
25712
+ if (exposedLogKeys.length > 0) {
25713
+ const mask = maskerOrIdentity(maskSecrets);
25714
+ const keys = exposedLogKeys.map((key) => mask(key)).join(", ");
25715
+ const one = exposedLogKeys.length === 1;
25716
+ this.logger.warn(safeMsg`${logicalId}: LoadBalancerAttributes ${one ? "key" : "keys"} ${keys} ${one ? "is" : "are"} no longer declared and ${one ? "keeps its live value" : "keep their live values"}, as CloudFormation leaves ${one ? "it" : "them"}, so the load balancer may keep delivering logs to the bucket it names. To stop it, declare the matching '<kind>_logs.s3.enabled' key as 'false' and deploy.`);
25717
+ }
25731
25718
  const newSubnets = properties["Subnets"];
25732
25719
  const oldSubnets = previousProperties["Subnets"];
25733
25720
  const newMappings = properties["SubnetMappings"];
@@ -25757,7 +25744,7 @@ var ELBv2Provider = class {
25757
25744
  }));
25758
25745
  this.logger.debug(`Updated SecurityGroups for ${logicalId}`);
25759
25746
  }
25760
- const newIpType = properties["IpAddressType"];
25747
+ const newIpType = fromReadback ? properties["IpAddressType"] : clearOnUpdateRemoval(properties["IpAddressType"], previousProperties["IpAddressType"], "ipv4");
25761
25748
  const oldIpType = previousProperties["IpAddressType"];
25762
25749
  if (newIpType !== void 0 && newIpType !== oldIpType) {
25763
25750
  await this.getClient().send(new SetIpAddressTypeCommand({
@@ -25967,7 +25954,7 @@ var ELBv2Provider = class {
25967
25954
  try {
25968
25955
  const rawMatcher = properties["Matcher"];
25969
25956
  const matcher = rawMatcher && (rawMatcher.HttpCode !== void 0 || rawMatcher.GrpcCode !== void 0) ? rawMatcher : void 0;
25970
- const healthCheckPort = String(properties["Protocol"] ?? previousProperties["Protocol"] ?? "").toUpperCase() === "GENEVE" ? properties["HealthCheckPort"] : clearOnUpdateRemoval(properties["HealthCheckPort"], previousProperties["HealthCheckPort"], "traffic-port");
25957
+ const healthCheckPort = clearOnUpdateRemoval(properties["HealthCheckPort"], previousProperties["HealthCheckPort"], "traffic-port");
25971
25958
  await this.getClient().send(new ModifyTargetGroupCommand({
25972
25959
  TargetGroupArn: physicalId,
25973
25960
  HealthCheckProtocol: properties["HealthCheckProtocol"],
@@ -25980,14 +25967,7 @@ var ELBv2Provider = class {
25980
25967
  UnhealthyThresholdCount: properties["UnhealthyThresholdCount"] !== void 0 ? Number(properties["UnhealthyThresholdCount"]) : void 0,
25981
25968
  ...matcher && { Matcher: matcher }
25982
25969
  }));
25983
- const tgAttrDiff = this.diffAttributeBag("TargetGroupAttributes", logicalId, properties["TargetGroupAttributes"], previousProperties["TargetGroupAttributes"], (key, currentValue) => {
25984
- const fallback = Object.hasOwn(TARGET_GROUP_ATTRIBUTE_DEFAULTS, key) ? TARGET_GROUP_ATTRIBUTE_DEFAULTS[key] : void 0;
25985
- if (fallback === void 0) {
25986
- this.logger.warn(`TargetGroup attribute ${maskerOrIdentity(maskSecrets)(key)} was removed from the template but has no documented default cdkd can reset it to — the live value is retained. Set the attribute explicitly to change it.`);
25987
- return;
25988
- }
25989
- return currentValue === fallback ? void 0 : fallback;
25990
- }, fromReadback, maskSecrets);
25970
+ const tgAttrDiff = this.diffAttributeBag("TargetGroupAttributes", logicalId, properties["TargetGroupAttributes"], previousProperties["TargetGroupAttributes"], RETAIN_REMOVED_ATTRIBUTE, fromReadback, maskSecrets);
25991
25971
  if (tgAttrDiff.length > 0) {
25992
25972
  await this.getClient().send(new ModifyTargetGroupAttributesCommand({
25993
25973
  TargetGroupArn: physicalId,
@@ -26154,7 +26134,11 @@ var ELBv2Provider = class {
26154
26134
  ...alpnPolicy && alpnPolicy.length > 0 && { AlpnPolicy: alpnPolicy },
26155
26135
  ...mutualAuth !== void 0 && { MutualAuthentication: mutualAuth }
26156
26136
  }));
26157
- const submittedAttrs = this.diffAttributeBag("ListenerAttributes", logicalId, properties["ListenerAttributes"], previousProperties["ListenerAttributes"], this.attributeRemovalResolver(LISTENER_ATTRIBUTE_DEFAULTS), fromReadback, maskSecrets);
26137
+ const removedMisleadingKeys = [];
26138
+ const submittedAttrs = this.diffAttributeBag("ListenerAttributes", logicalId, properties["ListenerAttributes"], previousProperties["ListenerAttributes"], (key) => {
26139
+ if (MISLEADING_IF_KEPT_ATTRIBUTE.test(key)) removedMisleadingKeys.push(key);
26140
+ return RETAIN_REMOVED_ATTRIBUTE();
26141
+ }, fromReadback, maskSecrets);
26158
26142
  if (submittedAttrs.length > 0) {
26159
26143
  const watch = startInterruptWatch(`ELBv2 Listener ${logicalId} attributes`);
26160
26144
  try {
@@ -26173,6 +26157,12 @@ var ELBv2Provider = class {
26173
26157
  }
26174
26158
  await this.applyTagDiff(physicalId, resourceType, logicalId, previousProperties["Tags"], properties["Tags"], maskSecrets);
26175
26159
  this.logger.debug(`Successfully updated Listener ${logicalId}`);
26160
+ if (removedMisleadingKeys.length > 0) {
26161
+ const mask = maskerOrIdentity(maskSecrets);
26162
+ const keys = removedMisleadingKeys.map((key) => mask(key)).join(", ");
26163
+ const one = removedMisleadingKeys.length === 1;
26164
+ this.logger.warn(safeMsg`${logicalId}: ListenerAttributes ${one ? "key" : "keys"} ${keys} ${one ? "is" : "are"} no longer declared and ${one ? "keeps its live value" : "keep their live values"}, as CloudFormation leaves ${one ? "it" : "them"}, so the listener may keep sending a CORS response header, or keep writing a request header under its renamed name. To change ${one ? "it" : "them"}, declare the value you want and deploy, or set ${one ? "it" : "them"} with 'aws elbv2 modify-listener-attributes'.`);
26165
+ }
26176
26166
  if (leftInPlaceNames.length > 0 && !fromReadback) this.logger.warn(listenerLeftInPlaceWarning(logicalId, leftInPlaceNames, context?.replayingState ? "rollback" : "deploy"));
26177
26167
  return {
26178
26168
  physicalId,
@@ -26253,12 +26243,6 @@ var ELBv2Provider = class {
26253
26243
  }
26254
26244
  return submitted;
26255
26245
  }
26256
- attributeRemovalResolver(defaults) {
26257
- return (key, currentValue) => {
26258
- const fallback = Object.hasOwn(defaults, key) ? defaults[key] : "";
26259
- return currentValue === fallback ? void 0 : fallback;
26260
- };
26261
- }
26262
26246
  async readUpdateTargets(logicalId, physicalId, resourceType, desiredRaw, recordedRaw, groupPort) {
26263
26247
  const desired = readTargets(desiredRaw, "desired");
26264
26248
  if (desired.kind === "malformed") throw markNonRetryable(new ProvisioningError(`desired Targets of TargetGroup ${logicalId} is not a list of ${TARGETS_WHAT}${targetsSecretCause(desired)} — the target group was not updated`, resourceType, logicalId, physicalId));
@@ -27819,7 +27803,6 @@ var DocDBProvider = class {
27819
27803
  logger = getLogger().child("DocDBProvider");
27820
27804
  protectionFlips = new ProtectionFlipRegistry();
27821
27805
  disableCcApiFallback = true;
27822
- removalDefaults = /* @__PURE__ */ new Map([["AWS::DocDB::DBCluster", /* @__PURE__ */ new Map([["DeletionProtection", false]])]]);
27823
27806
  handledProperties = /* @__PURE__ */ new Map([["AWS::DocDB::DBCluster", /* @__PURE__ */ new Set([
27824
27807
  "DBClusterIdentifier",
27825
27808
  "EngineVersion",
@@ -27869,8 +27852,7 @@ var DocDBProvider = class {
27869
27852
  default: throw new ProvisioningError(`Unsupported resource type: ${resourceType}`, resourceType, logicalId);
27870
27853
  }
27871
27854
  }
27872
- async update(logicalId, physicalId, resourceType, properties, previousProperties, context) {
27873
- properties = withRemovalDefaults(this.removalDefaults, resourceType, properties, previousProperties, context);
27855
+ async update(logicalId, physicalId, resourceType, properties, previousProperties, _context) {
27874
27856
  switch (resourceType) {
27875
27857
  case "AWS::DocDB::DBCluster": return this.updateDBCluster(logicalId, physicalId, resourceType, properties, previousProperties);
27876
27858
  case "AWS::DocDB::DBInstance": return this.updateDBInstance(logicalId, physicalId, resourceType, properties, previousProperties);
@@ -27937,7 +27919,7 @@ var DocDBProvider = class {
27937
27919
  DBClusterIdentifier: physicalId,
27938
27920
  EngineVersion: properties["EngineVersion"],
27939
27921
  DeletionProtection: properties["DeletionProtection"],
27940
- BackupRetentionPeriod: clearOnUpdateRemoval(properties["BackupRetentionPeriod"] != null ? Number(properties["BackupRetentionPeriod"]) : void 0, previousProperties["BackupRetentionPeriod"] != null ? Number(previousProperties["BackupRetentionPeriod"]) : void 0, 1),
27922
+ BackupRetentionPeriod: properties["BackupRetentionPeriod"] != null ? Number(properties["BackupRetentionPeriod"]) : void 0,
27941
27923
  PreferredBackupWindow: properties["PreferredBackupWindow"],
27942
27924
  PreferredMaintenanceWindow: properties["PreferredMaintenanceWindow"],
27943
27925
  DBClusterParameterGroupName: properties["DBClusterParameterGroupName"],
@@ -30969,7 +30951,6 @@ var ElastiCacheProvider = class {
30969
30951
  createClient;
30970
30952
  providerRegion = ambientRegion();
30971
30953
  logger = getLogger().child("ElastiCacheProvider");
30972
- removalDefaults = /* @__PURE__ */ new Map([["AWS::ElastiCache::CacheCluster", /* @__PURE__ */ new Map([["AutoMinorVersionUpgrade", true]])]]);
30973
30954
  handledProperties = /* @__PURE__ */ new Map([["AWS::ElastiCache::SubnetGroup", /* @__PURE__ */ new Set([
30974
30955
  "CacheSubnetGroupName",
30975
30956
  "CacheSubnetGroupDescription",
@@ -31026,8 +31007,7 @@ var ElastiCacheProvider = class {
31026
31007
  default: throw new ProvisioningError(`Unsupported resource type: ${resourceType}`, resourceType, logicalId);
31027
31008
  }
31028
31009
  }
31029
- async update(logicalId, physicalId, resourceType, properties, previousProperties, context) {
31030
- properties = withRemovalDefaults(this.removalDefaults, resourceType, properties, previousProperties, context);
31010
+ async update(logicalId, physicalId, resourceType, properties, previousProperties, _context) {
31031
31011
  switch (resourceType) {
31032
31012
  case "AWS::ElastiCache::SubnetGroup": return this.updateSubnetGroup(logicalId, physicalId, resourceType, properties, previousProperties);
31033
31013
  case "AWS::ElastiCache::CacheCluster": return this.updateCacheCluster(logicalId, physicalId, resourceType, properties, previousProperties);
@@ -31174,7 +31154,6 @@ var ElastiCacheProvider = class {
31174
31154
  const rawSgIds = properties["VpcSecurityGroupIds"];
31175
31155
  const sgIds = rawSgIds && rawSgIds.length > 0 ? rawSgIds : void 0;
31176
31156
  const notificationTopicArn = properties["NotificationTopicArn"];
31177
- const notificationRemoved = notificationTopicArn === void 0 && previousProperties["NotificationTopicArn"] != null;
31178
31157
  await this.getClient().send(new ModifyCacheClusterCommand({
31179
31158
  CacheClusterId: physicalId,
31180
31159
  NumCacheNodes: properties["NumCacheNodes"] != null ? Number(properties["NumCacheNodes"]) : void 0,
@@ -31182,11 +31161,10 @@ var ElastiCacheProvider = class {
31182
31161
  CacheParameterGroupName: properties["CacheParameterGroupName"],
31183
31162
  EngineVersion: properties["EngineVersion"],
31184
31163
  PreferredMaintenanceWindow: properties["PreferredMaintenanceWindow"],
31185
- SnapshotRetentionLimit: clearOnUpdateRemoval(properties["SnapshotRetentionLimit"] != null ? Number(properties["SnapshotRetentionLimit"]) : void 0, previousProperties["SnapshotRetentionLimit"] != null ? Number(previousProperties["SnapshotRetentionLimit"]) : void 0, 0),
31164
+ SnapshotRetentionLimit: properties["SnapshotRetentionLimit"] != null ? Number(properties["SnapshotRetentionLimit"]) : void 0,
31186
31165
  SnapshotWindow: properties["SnapshotWindow"],
31187
31166
  AutoMinorVersionUpgrade: properties["AutoMinorVersionUpgrade"],
31188
31167
  NotificationTopicArn: notificationTopicArn,
31189
- ...notificationRemoved && { NotificationTopicStatus: "inactive" },
31190
31168
  ...notificationTopicArn !== void 0 && { NotificationTopicStatus: "active" },
31191
31169
  LogDeliveryConfigurations: this.buildLogDeliveryConfigurationsForUpdate(properties["LogDeliveryConfigurations"], previousProperties["LogDeliveryConfigurations"]),
31192
31170
  IpDiscovery: properties["IpDiscovery"],
@@ -34072,7 +34050,7 @@ async function refuseCatalogMove(args) {
34072
34050
  try {
34073
34051
  callerAccount = await args.callerAccountId();
34074
34052
  } catch (error) {
34075
- throw wrapMaskedAwsError(mask, error, (text) => new ProvisioningError(`Could not resolve the caller's account id (sts:GetCallerIdentity) to tell whether CatalogId ${mask(literal)} is this account's default Data Catalog, so cdkd did not update Glue ${args.noun} ${args.logicalId}: ${text}`, args.resourceType, args.logicalId, void 0, error instanceof Error ? error : void 0));
34053
+ throw wrapGlueError(mask, args.debug, error, (text) => new ProvisioningError(`Could not resolve the caller's account id (sts:GetCallerIdentity) to tell whether CatalogId ${mask(literal)} is this account's default Data Catalog, so cdkd did not update Glue ${args.noun} ${args.logicalId}: ${text}`, args.resourceType, args.logicalId, void 0, error instanceof Error ? error : void 0));
34076
34054
  }
34077
34055
  if (literal === callerAccount) return;
34078
34056
  }
@@ -34104,6 +34082,13 @@ function newGlueClients(region) {
34104
34082
  }))
34105
34083
  };
34106
34084
  }
34085
+ function wrapGlueError(mask, debug, error, build) {
34086
+ const failure = describeAwsFailure(error);
34087
+ if (!failure.redacted) return wrapMaskedAwsError(mask, error, build);
34088
+ debug(mask(build(failure.detail).message));
34089
+ const wrapped = build(mask(failure.summary));
34090
+ return error instanceof Error ? markRedactedCause(wrapped) : wrapped;
34091
+ }
34107
34092
  var GlueProvider = class {
34108
34093
  client;
34109
34094
  createClient;
@@ -34111,7 +34096,7 @@ var GlueProvider = class {
34111
34096
  callerAccountId = makeCallerAccountResolver(this.providerRegion);
34112
34097
  logger = getLogger().child("GlueProvider");
34113
34098
  wrapMaskedError(mask, error, build) {
34114
- return wrapMaskedAwsError(mask, error, build);
34099
+ return wrapGlueError(mask, (message) => this.logger.debug(message), error, build);
34115
34100
  }
34116
34101
  handledProperties = /* @__PURE__ */ new Map([["AWS::Glue::Database", /* @__PURE__ */ new Set([
34117
34102
  "DatabaseInput",
@@ -34210,6 +34195,7 @@ var GlueProvider = class {
34210
34195
  stateful: true,
34211
34196
  callerAccountId: this.callerAccountId,
34212
34197
  warn: log.warn,
34198
+ debug: log.debug,
34213
34199
  mask: log.mask
34214
34200
  });
34215
34201
  const catalogId = updateCatalogId(properties["CatalogId"]);
@@ -34263,7 +34249,7 @@ var GlueProvider = class {
34263
34249
  return;
34264
34250
  }
34265
34251
  const cause = error instanceof Error ? error : void 0;
34266
- throw new ProvisioningError(log.mask(`Failed to delete Glue Database ${logicalId}: ${describeAwsFailure(error).detail}`), resourceType, logicalId, physicalId, cause);
34252
+ throw this.wrapMaskedError(log.mask, error, (text) => new ProvisioningError(`Failed to delete Glue Database ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
34267
34253
  }
34268
34254
  }
34269
34255
  async createTable(logicalId, resourceType, properties, context) {
@@ -34342,6 +34328,7 @@ var GlueProvider = class {
34342
34328
  stateful: true,
34343
34329
  callerAccountId: this.callerAccountId,
34344
34330
  warn: log.warn,
34331
+ debug: log.debug,
34345
34332
  mask: log.mask
34346
34333
  });
34347
34334
  const catalogId = updateCatalogId(properties["CatalogId"]);
@@ -34371,7 +34358,7 @@ var GlueProvider = class {
34371
34358
  hint += live.versionId !== void 0 ? ` cdkd sent the version it read (${live.versionId}) as a precondition and AWS rejected the write, rather than let it put back the AWS-managed Parameters and StorageDescriptor members read a moment earlier — which for an Apache Iceberg table would have pinned it to an older metadata_location (an effective snapshot rollback).` : " AWS returned no VersionId on the pre-update read, so cdkd could not attach a precondition; AWS rejected the write on its own.";
34372
34359
  hint += ` Re-run the deploy to pick up the current values.`;
34373
34360
  }
34374
- throw this.wrapMaskedError(log.mask, error, (detail) => new ProvisioningError(`Failed to update Glue Table ${logicalId}: ${detail}${hint}`, resourceType, logicalId, physicalId, cause));
34361
+ throw this.wrapMaskedError(log.mask, error, (detail) => new ProvisioningError(`Failed to update Glue Table ${logicalId}: ${hint ? withoutFinalPeriod(detail) : detail}${hint}`, resourceType, logicalId, physicalId, cause));
34375
34362
  }
34376
34363
  }
34377
34364
  async deleteTable(logicalId, physicalId, resourceType, properties, context) {
@@ -34406,7 +34393,7 @@ var GlueProvider = class {
34406
34393
  return;
34407
34394
  }
34408
34395
  const cause = error instanceof Error ? error : void 0;
34409
- throw new ProvisioningError(log.mask(`Failed to delete Glue Table ${logicalId}: ${describeAwsFailure(error).detail}`), resourceType, logicalId, physicalId, cause);
34396
+ throw this.wrapMaskedError(log.mask, error, (text) => new ProvisioningError(`Failed to delete Glue Table ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
34410
34397
  }
34411
34398
  }
34412
34399
  preserveAwsManagedParameters(built, desiredParameters, previousParameters, liveParameters) {
@@ -34786,7 +34773,7 @@ var GlueWorkflowProvider = class {
34786
34773
  providerRegion = ambientRegion();
34787
34774
  logger = getLogger().child("GlueWorkflowProvider");
34788
34775
  wrapMaskedError(mask, error, build) {
34789
- return wrapMaskedAwsError(mask, error, build);
34776
+ return wrapGlueError(mask, (message) => this.logger.debug(message), error, build);
34790
34777
  }
34791
34778
  handledProperties = /* @__PURE__ */ new Map([["AWS::Glue::Workflow", /* @__PURE__ */ new Set([
34792
34779
  "Name",
@@ -34865,7 +34852,7 @@ var GlueWorkflowProvider = class {
34865
34852
  return;
34866
34853
  }
34867
34854
  const cause = error instanceof Error ? error : void 0;
34868
- throw new ProvisioningError(`Failed to delete Glue Workflow ${logicalId}: ${describeAwsFailure(error).detail}`, resourceType, logicalId, physicalId, cause);
34855
+ throw this.wrapMaskedError(context?.maskSecrets ?? ((text) => text), error, (text) => new ProvisioningError(`Failed to delete Glue Workflow ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
34869
34856
  }
34870
34857
  }
34871
34858
  async getAttribute(physicalId, _resourceType, attributeName) {
@@ -34941,7 +34928,7 @@ var GlueSecurityConfigurationProvider = class {
34941
34928
  providerRegion = ambientRegion();
34942
34929
  logger = getLogger().child("GlueSecurityConfigurationProvider");
34943
34930
  wrapMaskedError(mask, error, build) {
34944
- return wrapMaskedAwsError(mask, error, build);
34931
+ return wrapGlueError(mask, (message) => this.logger.debug(message), error, build);
34945
34932
  }
34946
34933
  handledProperties = /* @__PURE__ */ new Map([["AWS::Glue::SecurityConfiguration", /* @__PURE__ */ new Set(["Name", "EncryptionConfiguration"])]]);
34947
34934
  getClient() {
@@ -34993,7 +34980,7 @@ var GlueSecurityConfigurationProvider = class {
34993
34980
  return;
34994
34981
  }
34995
34982
  const cause = error instanceof Error ? error : void 0;
34996
- throw new ProvisioningError(`Failed to delete Glue SecurityConfiguration ${logicalId}: ${describeAwsFailure(error).detail}`, resourceType, logicalId, physicalId, cause);
34983
+ throw this.wrapMaskedError(context?.maskSecrets ?? ((text) => text), error, (text) => new ProvisioningError(`Failed to delete Glue SecurityConfiguration ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
34997
34984
  }
34998
34985
  }
34999
34986
  async getAttribute(physicalId, _resourceType, attributeName) {
@@ -35134,7 +35121,7 @@ var GlueJobProvider = class {
35134
35121
  providerRegion = ambientRegion();
35135
35122
  logger = getLogger().child("GlueJobProvider");
35136
35123
  wrapMaskedError(mask, error, build) {
35137
- return wrapMaskedAwsError(mask, error, build);
35124
+ return wrapGlueError(mask, (message) => this.logger.debug(message), error, build);
35138
35125
  }
35139
35126
  handledProperties = /* @__PURE__ */ new Map([["AWS::Glue::Job", /* @__PURE__ */ new Set([
35140
35127
  "Name",
@@ -35244,7 +35231,7 @@ var GlueJobProvider = class {
35244
35231
  return;
35245
35232
  }
35246
35233
  const cause = error instanceof Error ? error : void 0;
35247
- throw new ProvisioningError(`Failed to delete Glue Job ${logicalId}: ${describeAwsFailure(error).detail}`, resourceType, logicalId, physicalId, cause);
35234
+ throw this.wrapMaskedError(context?.maskSecrets ?? ((text) => text), error, (text) => new ProvisioningError(`Failed to delete Glue Job ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
35248
35235
  }
35249
35236
  }
35250
35237
  async getAttribute(physicalId, _resourceType, attributeName) {
@@ -35380,8 +35367,11 @@ function asRecord$1(value) {
35380
35367
  if (typeof value !== "object" || value === null || Array.isArray(value)) return;
35381
35368
  return value;
35382
35369
  }
35370
+ function withoutFinalPeriod(text) {
35371
+ return text.endsWith(".") ? text.slice(0, -1) : text;
35372
+ }
35383
35373
  function preUpdateReadFailureMessage(kind, iamAction, logicalId, detail) {
35384
- return `Failed to read the current Glue ${kind} ${logicalId} before update: ${detail}. cdkd reads the live ${kind.toLowerCase()} so AWS-managed Parameters (Apache Iceberg's table_type / metadata_location, a crawler's classification, Lake Formation markers) survive an update that Glue applies as a full replace. Grant ${iamAction} to the deploy identity — proceeding without the read would silently erase them.`;
35374
+ return `Failed to read the current Glue ${kind} ${logicalId} before update: ${withoutFinalPeriod(detail)}. cdkd reads the live ${kind.toLowerCase()} so AWS-managed Parameters (Apache Iceberg's table_type / metadata_location, a crawler's classification, Lake Formation markers) survive an update that Glue applies as a full replace. Grant ${iamAction} to the deploy identity — proceeding without the read would silently erase them.`;
35385
35375
  }
35386
35376
  function coerceNumber(value) {
35387
35377
  if (typeof value === "number") return value;
@@ -35428,7 +35418,7 @@ var GlueCrawlerProvider = class {
35428
35418
  providerRegion = ambientRegion();
35429
35419
  logger = getLogger().child("GlueCrawlerProvider");
35430
35420
  wrapMaskedError(mask, error, build) {
35431
- return wrapMaskedAwsError(mask, error, build);
35421
+ return wrapGlueError(mask, (message) => this.logger.debug(message), error, build);
35432
35422
  }
35433
35423
  handledProperties = /* @__PURE__ */ new Map([["AWS::Glue::Crawler", /* @__PURE__ */ new Set([
35434
35424
  "Name",
@@ -35535,14 +35525,23 @@ var GlueCrawlerProvider = class {
35535
35525
  log.debug(`Glue Crawler ${v(physicalId)} does not exist, skipping deletion`);
35536
35526
  return;
35537
35527
  }
35528
+ let failure = error;
35538
35529
  if (error instanceof CrawlerRunningException) {
35539
35530
  log.debug(`Glue Crawler ${v(physicalId)} is running; stopping before delete and retrying`);
35540
- await this.stopCrawlerAndWait(physicalId, log);
35541
- await this.getClient().send(new DeleteCrawlerCommand({ Name: physicalId }));
35542
- return;
35531
+ try {
35532
+ await this.stopCrawlerAndWait(physicalId, log);
35533
+ await this.getClient().send(new DeleteCrawlerCommand({ Name: physicalId }));
35534
+ return;
35535
+ } catch (retryError) {
35536
+ if (retryError instanceof EntityNotFoundException) {
35537
+ log.debug(`Glue Crawler ${v(physicalId)} does not exist, skipping deletion`);
35538
+ return;
35539
+ }
35540
+ failure = retryError;
35541
+ }
35543
35542
  }
35544
- const cause = error instanceof Error ? error : void 0;
35545
- throw new ProvisioningError(log.mask(`Failed to delete Glue Crawler ${logicalId}: ${describeAwsFailure(error).detail}`), resourceType, logicalId, physicalId, cause);
35543
+ const cause = failure instanceof Error ? failure : void 0;
35544
+ throw this.wrapMaskedError(log.mask, failure, (text) => new ProvisioningError(`Failed to delete Glue Crawler ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
35546
35545
  }
35547
35546
  }
35548
35547
  async stopCrawlerAndWait(physicalId, log = {
@@ -35690,7 +35689,7 @@ var GlueConnectionProvider = class {
35690
35689
  callerAccountId = makeCallerAccountResolver(this.providerRegion);
35691
35690
  logger = getLogger().child("GlueConnectionProvider");
35692
35691
  wrapMaskedError(mask, error, build) {
35693
- return wrapMaskedAwsError(mask, error, build);
35692
+ return wrapGlueError(mask, (message) => this.logger.debug(message), error, build);
35694
35693
  }
35695
35694
  handledProperties = /* @__PURE__ */ new Map([["AWS::Glue::Connection", /* @__PURE__ */ new Set(["ConnectionInput", "CatalogId"])]]);
35696
35695
  getClient() {
@@ -35752,6 +35751,7 @@ var GlueConnectionProvider = class {
35752
35751
  stateful: false,
35753
35752
  callerAccountId: this.callerAccountId,
35754
35753
  warn: log.warn,
35754
+ debug: log.debug,
35755
35755
  mask: log.mask
35756
35756
  });
35757
35757
  const catalogId = updateCatalogId(properties["CatalogId"]);
@@ -35791,7 +35791,7 @@ var GlueConnectionProvider = class {
35791
35791
  return;
35792
35792
  }
35793
35793
  const cause = error instanceof Error ? error : void 0;
35794
- throw new ProvisioningError(log.mask(`Failed to delete Glue Connection ${logicalId}: ${describeAwsFailure(error).detail}`), resourceType, logicalId, physicalId, cause);
35794
+ throw this.wrapMaskedError(log.mask, error, (text) => new ProvisioningError(`Failed to delete Glue Connection ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
35795
35795
  }
35796
35796
  }
35797
35797
  async getAttribute(physicalId, _resourceType, attributeName) {
@@ -35866,7 +35866,7 @@ var GlueTriggerProvider = class {
35866
35866
  providerRegion = ambientRegion();
35867
35867
  logger = getLogger().child("GlueTriggerProvider");
35868
35868
  wrapMaskedError(mask, error, build) {
35869
- return wrapMaskedAwsError(mask, error, build);
35869
+ return wrapGlueError(mask, (message) => this.logger.debug(message), error, build);
35870
35870
  }
35871
35871
  handledProperties = /* @__PURE__ */ new Map([["AWS::Glue::Trigger", /* @__PURE__ */ new Set([
35872
35872
  "Name",
@@ -35964,7 +35964,9 @@ var GlueTriggerProvider = class {
35964
35964
  await this.getClient().send(new StartTriggerCommand({ Name: physicalId }));
35965
35965
  } catch (restartError) {
35966
35966
  if (updateError === void 0) throw restartError;
35967
- log.warn(`Failed to re-activate Glue Trigger ${v(physicalId)} after a failed update: ${describeAwsFailure(restartError).detail}`);
35967
+ const restartFailure = describeAwsFailure(restartError);
35968
+ log.warn(`Failed to re-activate Glue Trigger ${v(physicalId)} after a failed update: ${restartFailure.summary}`);
35969
+ if (restartFailure.redacted) log.debug(`Failed to re-activate Glue Trigger ${v(physicalId)} after a failed update: ${restartFailure.detail}`);
35968
35970
  }
35969
35971
  if (updateError !== void 0) throw updateError;
35970
35972
  await applyGlueTagDiff(this.getClient(), () => this.resourceArn(physicalId), previousProperties["Tags"], properties["Tags"], resourceType, logicalId, log.warn);
@@ -36016,7 +36018,7 @@ var GlueTriggerProvider = class {
36016
36018
  return;
36017
36019
  }
36018
36020
  const cause = error instanceof Error ? error : void 0;
36019
- const failure = new ProvisioningError(`Failed to delete Glue Trigger ${logicalId}: ${describeAwsFailure(error).detail}`, resourceType, logicalId, physicalId, cause);
36021
+ const failure = this.wrapMaskedError(context?.maskSecrets ?? ((text) => text), error, (text) => new ProvisioningError(`Failed to delete Glue Trigger ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
36020
36022
  throw stripped ? markDeleteStarted(failure) : failure;
36021
36023
  }
36022
36024
  }
@@ -44382,30 +44384,6 @@ var DLMLifecyclePolicyProvider = class {
44382
44384
  ...properties["Exclusions"] != null && { Exclusions: properties["Exclusions"] }
44383
44385
  };
44384
44386
  }
44385
- buildRemovalResets(properties, previousProperties) {
44386
- const resets = {};
44387
- const createInterval = clearOnUpdateRemoval(properties["CreateInterval"] != null ? Number(properties["CreateInterval"]) : void 0, previousProperties["CreateInterval"] != null ? Number(previousProperties["CreateInterval"]) : void 0, 1);
44388
- if (createInterval !== void 0) resets.CreateInterval = createInterval;
44389
- const retainInterval = clearOnUpdateRemoval(properties["RetainInterval"] != null ? Number(properties["RetainInterval"]) : void 0, previousProperties["RetainInterval"] != null ? Number(previousProperties["RetainInterval"]) : void 0, 7);
44390
- if (retainInterval !== void 0) resets.RetainInterval = retainInterval;
44391
- const copyTags = clearOnUpdateRemoval(properties["CopyTags"] ?? void 0, previousProperties["CopyTags"] ?? void 0, false);
44392
- if (copyTags !== void 0) resets.CopyTags = copyTags;
44393
- const extendDeletion = clearOnUpdateRemoval(properties["ExtendDeletion"] ?? void 0, previousProperties["ExtendDeletion"] ?? void 0, false);
44394
- if (extendDeletion !== void 0) resets.ExtendDeletion = extendDeletion;
44395
- const crossRegionCopyTargets = clearOnUpdateRemoval(properties["CrossRegionCopyTargets"] ?? void 0, previousProperties["CrossRegionCopyTargets"] ?? void 0, []);
44396
- if (crossRegionCopyTargets !== void 0) resets.CrossRegionCopyTargets = crossRegionCopyTargets;
44397
- const defaultPolicy = properties["DefaultPolicy"] ?? previousProperties["DefaultPolicy"];
44398
- const exclusionsClear = defaultPolicy === "VOLUME" ? {
44399
- ExcludeBootVolumes: false,
44400
- ExcludeVolumeTypes: [],
44401
- ExcludeTags: []
44402
- } : defaultPolicy === "INSTANCE" ? { ExcludeTags: [] } : void 0;
44403
- if (exclusionsClear !== void 0) {
44404
- const exclusions = clearOnUpdateRemoval(properties["Exclusions"] ?? void 0, previousProperties["Exclusions"] ?? void 0, exclusionsClear);
44405
- if (exclusions !== void 0) resets.Exclusions = exclusions;
44406
- }
44407
- return resets;
44408
- }
44409
44387
  async fetchPolicyArn(policyId) {
44410
44388
  return (await this.getClient().send(new GetLifecyclePolicyCommand$1({ PolicyId: policyId }))).Policy?.PolicyArn ?? "";
44411
44389
  }
@@ -44459,7 +44437,8 @@ var DLMLifecyclePolicyProvider = class {
44459
44437
  await this.getClient().send(new UpdateLifecyclePolicyCommand({
44460
44438
  PolicyId: physicalId,
44461
44439
  ...this.toSdkFields(properties),
44462
- ...this.buildRemovalResets(properties, previousProperties)
44440
+ ...properties["CreateInterval"] != null && { CreateInterval: Number(properties["CreateInterval"]) },
44441
+ ...properties["RetainInterval"] != null && { RetainInterval: Number(properties["RetainInterval"]) }
44463
44442
  }));
44464
44443
  const plan = planTagDiff(previousProperties["Tags"], properties["Tags"]);
44465
44444
  const tagWarning = tagPlanWarning(plan, resourceType, logicalId);
@@ -46090,6 +46069,7 @@ var NestedStackProvider = class {
46090
46069
  physicalId,
46091
46070
  attributes: childOutputs.attributes,
46092
46071
  ...childOutputs.noEchoAttributeNames.length > 0 && { noEchoAttributeNames: childOutputs.noEchoAttributeNames },
46072
+ secretNamedAttributeNames: childOutputs.secretNamedAttributeNames,
46093
46073
  ...pendingRecord && { effectiveProperties: pendingRecord }
46094
46074
  };
46095
46075
  } catch (error) {
@@ -46117,6 +46097,7 @@ var NestedStackProvider = class {
46117
46097
  wasReplaced: false,
46118
46098
  attributes: updatedOutputs.attributes,
46119
46099
  ...updatedOutputs.noEchoAttributeNames.length > 0 && { noEchoAttributeNames: updatedOutputs.noEchoAttributeNames },
46100
+ secretNamedAttributeNames: updatedOutputs.secretNamedAttributeNames,
46120
46101
  ...pendingRecord && { effectiveProperties: pendingRecord }
46121
46102
  };
46122
46103
  }
@@ -46300,9 +46281,11 @@ var NestedStackProvider = class {
46300
46281
  attributes[attributeName] = recovered;
46301
46282
  noEchoAttributeNames.push(attributeName);
46302
46283
  }
46284
+ const childResources = childStateData.state.resources;
46303
46285
  return {
46304
46286
  attributes,
46305
- noEchoAttributeNames
46287
+ noEchoAttributeNames,
46288
+ secretNamedAttributeNames: childResources !== null && typeof childResources === "object" ? secretNamedAttributeNamesOf(attributes, childResources, rowSecrets) : []
46306
46289
  };
46307
46290
  }
46308
46291
  requireContext() {
@@ -46780,4 +46763,4 @@ var ACMCertificateProvider = class {
46780
46763
 
46781
46764
  //#endregion
46782
46765
  export { ACMCertificateProvider, ASGProvider, AgentCoreBrowserProvider, AgentCoreCodeInterpreterProvider, AgentCoreEvaluatorProvider, AgentCoreRuntimeProvider, ApiGatewayProvider, ApiGatewayV2Provider, AppSyncProvider, BudgetsBudgetProvider, CloudFrontDistributionProvider, CloudFrontOACProvider, CloudFrontOAIProvider, CloudTrailProvider, CloudWatchAlarmProvider, CloudWatchAnomalyDetectorProvider, CodeBuildProvider, CodeCommitRepositoryProvider, CognitoUserPoolProvider, DLMLifecyclePolicyProvider, DocDBProvider, DocDBSubnetGroupProvider, DynamoDBGlobalTableProvider, DynamoDBTableProvider, EC2Provider, ECRProvider, ECSProvider, EFSProvider, ELBv2Provider, EMRClusterProvider, EMRInstanceFleetConfigProvider, EMRInstanceGroupConfigProvider, ElastiCacheProvider, EventBridgeBusProvider, EventBridgeRuleProvider, FSxFileSystemProvider, FirehoseProvider, GlueConnectionProvider, GlueCrawlerProvider, GlueJobProvider, GlueProvider, GlueSecurityConfigurationProvider, GlueTriggerProvider, GlueWorkflowProvider, IAMAccessKeyProvider, IAMInstanceProfileProvider, IAMManagedPolicyProvider, IAMPolicyProvider, IAMRoleProvider, IAMUserGroupProvider, KMSProvider, KinesisStreamConsumerProvider, KinesisStreamProvider, LambdaEventInvokeConfigProvider, LambdaEventSourceMappingProvider, LambdaFunctionProvider, LambdaLayerVersionProvider, LambdaMicrovmImageProvider, LambdaNetworkConnectorProvider, LambdaPermissionProvider, LambdaUrlProvider, LambdaWebFunctionEndpointProvider, LambdaWebFunctionRevisionProvider, LogsLogGroupProvider, NeptuneProvider, NestedStackProvider, PipesPipeProvider, RDSDBProxyEndpointProvider, RDSDBProxyProvider, RDSDBProxyTargetGroupProvider, RDSProvider, Route53Provider, S3BucketPolicyProvider, S3BucketProvider, S3DirectoryBucketProvider, S3TablesProvider, S3VectorsProvider, SNSSubscriptionProvider, SNSTopicPolicyProvider, SNSTopicProvider, SQSQueuePolicyProvider, SQSQueueProvider, SSMParameterProvider, SchedulerScheduleProvider, SecretsManagerSecretProvider, ServiceDiscoveryProvider, StepFunctionsProvider, WAFv2WebACLProvider, WaitConditionHandleProvider };
46783
- //# sourceMappingURL=provider-classes-59TTNMFB.js.map
46766
+ //# sourceMappingURL=provider-classes-DPwEHVDJ.js.map