@go-to-k/cdkd 0.298.2 → 0.298.4

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.
@@ -2,17 +2,17 @@ import { r as getAwsClients } from "./aws-clients-CnmtbrxD.js";
2
2
  import { F as displayStackName, I as isPasteableIdent, N as displayIdent, O as SECRET_REF_MAX_CODE_POINTS, P as displaySafe, R as plainIdentOr, a as getLogger, b as generateResourceNameWithFallback, n as isAwsAuthoredFailure, r as safeStringify, t as describeAwsFailure, y as generateResourceName, z as safeMsg } from "./aws-failure-text-DtvlUugx.js";
3
3
  import { $ as protectedReplacementAdvice, $n as isAmbiguousOutcomeError, $t as credentialFingerprint, A as isQuotableImportValue, B as isTerminalDeleteFailure, Bn as withheldTargetClause, C as setBounded, D as VALUE_NOT_SHOWN, E as assertRegionMatch, F as resolveExplicitPhysicalId, Gt as injectiveKeyPrefix, H as observeThenDisableProtection, In as plainOrDescribed, L as ProtectionFlipRegistry, M as quotedRemedyLogicalId, Mn as hasClauseBreak, Mt as markCreatedBeforeFailure, N as refusalTypeShown, Nn as isInertUnquoted, O as isPlainImportJson, P as remedyLogicalId, Pn as pasteableCommand, Q as pasteableAwsCommand, Qt as clientDefaultsFor, S as replayedSendWindow, St as withDerivedNameMasks, T as RESOURCE_NOT_FOUND, Tt as clearCreatedBeforeFailure, U as protectionFlipKey, V as logGroupProtectionSite, W as rdsFamilyProtectionSite, Wt as injectiveKey, X as WITHHELD_AWS_COMMAND, Xn as markReplayMayCollide, Xt as ambientClientDefaults, Y as UNNAMEABLE_ID_CLAUSE, Yn as markNameCollision, Yt as withPasteableAwsProfile, Z as isAwsCliLiteral, Zt as ambientCredentialConfig, _ as RecentIdSet, _t as createMaskedLogSinks, a as onlySecretDerived, ar as isMarkedNonRetryable, at as startInterruptWatch, b as isInsideWindow, bt as maskDeep, c as recordedPrincipalsRepair, cr as markRedactedCause, ct as canonicalizeRoute53QueryName, dt as compositeIdSkipResult, en as AccountIdUnavailableError, et as renderDisableCommand, ft as logicalIdShown, g as AmbiguousCreateLatch, gn as ProvisioningError, gt as stateOrphanRecordRemedy, h as AMBIGUOUS_LATCH_TTL_MS, ht as segmentAfterAnchor, i as holdsSecretDerivedEntry, ir as THROTTLING_ERROR_NAMES, it as isInterruptedWaitError, j as normalizeAwsTagsToCfn, jn as commandHole, jt as markAuxiliaryFailure, k as isPlainImportValue, lr as wrapMaskedAwsError, lt as compositeIdFormatMessage, nn as CdkdError, nr as isTransientServerError, o as readPrincipalLists, or as isThrottlingError, ot as ElapsedBudgetRegistry, p as withRemovalDefaults, pt as packCompositeId, q as userPoolProtectionSite, r as SECRET_DERIVED_READ_LIVE, sr as markNonRetryable, tr as isRetryableTransientError, u as clearOnUpdateRemoval, ut as compositeIdSeparatorRefusal, v as ambiguousAttemptLead, vn as ResourceUpdateNotSupportedError, vt as createMaskedRetryLogger, w as withoutServerErrorRetries, x as replayFollowedAmbiguousAttempt, xt as maskerOrIdentity, y as createAttemptKey, yt as isSecretDerivedValue, z as deleteWithProtectionCompensation, zn as shellQuote } from "./iam-policy-targets-CwKiK9nS.js";
4
4
  import { s as ambientRegion } from "./aws-client-defaults-D0q0z4dG.js";
5
- import { $ as isTruthyCfnBoolean, $o as markSameGenerationBag, B as DYNAMODB_DELETE_MIN_RESOURCE_TIMEOUT_MS, Br as reDisableInstanceApiTermination, Bt as getStackRecords, Co as sameLambdaFunctionAddress, Ct as revertNestedChildFromJournal, Dr as unchangedBehindSecretReference, Dt as getCurrentNestedStackContext, Ei as parseWebACLArn, Er as slowCcOperationTimeoutMs, Fo as passedNoEchoParametersOf, Fr as markWaitAbandoned, G as resolveDynamoDbDeleteBudgetMs, Ga as findSilentDropProperties, H as compensateRemovedDeletionProtection, Ho as hasMaskableValues, Ii as accountArgs, J as deleteTableWithIndexBusyRetry, K as DELETE_INDEX_WAIT_PROCEED_NOTE, Lr as ec2InstanceProtectionSite, Mr as deleteSkipReason, Nr as withIndeterminateGuard, Ot as withNestedStackContext, Pr as isWaitAbandonedError, Q as hasCdkAutoDeleteTag, Qn as earliestDefined, Rr as isTerminationProtectionPropagationError, Rt as awaitInFlightSibling, Sl as resolveAssemblyPath, So as lambdaFunctionNameForMask, U as deleteBudgetKey, Ua as withheldAccountClause, V as beginDeleteWait, Vr as reEnableInstanceApiTermination, W as resolveDynamoDbDeleteBudgetClock, X as ECR_AUTO_DELETE_IMAGES_TAG, Y as waitForIndexesSettled, Z as S3_AUTO_DELETE_OBJECTS_TAG, a as findNestedTemplateTreeDefect, ac as rewriteTemplateAssetReferences, ai as s3BucketArn, al as decodeListingKey, an as isRedactedRecordedValue, ao as toCfnInteger, ar as planTagDiff, as as dynamicReferenceTokens, b as lookupEachName, bl as displayAssemblyPath, bo as withRetry, br as getCurrentResourceSecrets, bt as getNestedRevertRun, c as renderNestedTemplateTreeDefect, ci as s3BucketRegionalDomainName, cl as canonicalizeRegion, co as coerceCfnInteger, cr as tagMapAsList, da as refuseMalformedNestedChildOutputs, do as configStringRefusal, dr as stringifyIfAssigned, ds as recoverMaskedOutput, ec as stringifyValue, er as reserveStackCreateToken, es as redactSecretsForState, et as getPriorAttempts, fo as readConfigString, fs as physicalNameCopiesOf, gi as getAccountInfo, go as requireConfigString, ho as requireConfigObject, hs as carriesSecretMask, ii as isSettledInstanceState, in as REDACTED_DELETE_ADDRESS_SKIP_REASON, io as isWarmThroughputDecrease, ir as DBPROXY_TAG_OPTIONS, ja as refuseMalformedResourcesForDestroy, ki as passedParameterClassesOf, li as s3BucketWebsiteUrl, ll as derivePartitionAndUrlSuffix, lo as configBooleanRefusal, lr as tagPlanWarning, mo as requireConfigArray, nn as getCurrentProducerRegions, no as WARM_THROUGHPUT_MEMBERS, nr as acquireIdempotencyToken, o as isAbsoluteAssetPath, oi as s3BucketDomainName, on as redactedDeleteAddressFields, oo as toFiniteNumber, or as readTagList, po as replayWarn, q as INDEX_SETTLE_POLL_INTERVAL_MS, qa as withoutSilentDropProperties, ro as coerceWarmThroughput$1, rr as DBPROXY_TAGS_WHAT, rs as withoutPhysicalNameCopies, s as listNestedTemplateRows, si as s3BucketDualStackDomainName, sn as redactedDeleteAddressSkip, so as coerceCfnBoolean, sr as refuseMalformedDesiredTags, t as DeployEngine, tt as markRefusedBeforeApplying, uo as configIntegerRefusal, ur as definedAttributes, v as chunks, x as withApiLimit, xl as renderAssemblyPathEscape, xo as canonicalLambdaFunctionName, y as isAccessDeniedError, yl as describeFileReadFailure, z as DynamoDBGlobalTableProvider, zr as observeThenDisableInstanceApiTermination } from "./deploy-engine-BgWY0v3K.js";
6
- import { n as collectInlinePolicyNamesManagedBySiblings, r as IamCreateClientCache, t as IAMRoleProvider } from "./iam-role-provider-KCSxfQZh.js";
7
- import { a as canonicalizeIpProtocolValue, i as resolveSecretDerivedPrincipals, n as runDestroyForStack, o as resolvedResourceTimeoutMs, r as isResolvableSecretPrincipalList, t as canonicalizeIpv4Cidr } from "./program-BzEA5Cka.js";
8
- import { RDSProvider } from "./rds-provider-D4kq6O-L.js";
9
- import { NeptuneProvider } from "./neptune-provider-BGAmbyRB.js";
10
- import { ASGProvider } from "./asg-provider-Ds5ElkGf.js";
5
+ import { $ as isTruthyCfnBoolean, $o as markSameGenerationBag, B as DYNAMODB_DELETE_MIN_RESOURCE_TIMEOUT_MS, Br as reDisableInstanceApiTermination, Bt as getStackRecords, Cl as renderAssemblyPathEscape, Co as sameLambdaFunctionAddress, Ct as revertNestedChildFromJournal, Dr as unchangedBehindSecretReference, Dt as getCurrentNestedStackContext, Ei as parseWebACLArn, Er as slowCcOperationTimeoutMs, Fo as passedNoEchoParametersOf, Fr as markWaitAbandoned, G as resolveDynamoDbDeleteBudgetMs, Ga as findSilentDropProperties, H as compensateRemovedDeletionProtection, Ho as hasMaskableValues, Ii as accountArgs, J as deleteTableWithIndexBusyRetry, K as DELETE_INDEX_WAIT_PROCEED_NOTE, Lr as ec2InstanceProtectionSite, Mr as deleteSkipReason, Nr as withIndeterminateGuard, Ot as withNestedStackContext, Pr as isWaitAbandonedError, Q as hasCdkAutoDeleteTag, Qn as earliestDefined, Rr as isTerminationProtectionPropagationError, Rt as awaitInFlightSibling, Sl as displayAssemblyPath, So as lambdaFunctionNameForMask, U as deleteBudgetKey, Ua as withheldAccountClause, V as beginDeleteWait, Vr as reEnableInstanceApiTermination, W as resolveDynamoDbDeleteBudgetClock, X as ECR_AUTO_DELETE_IMAGES_TAG, Y as waitForIndexesSettled, Z as S3_AUTO_DELETE_OBJECTS_TAG, a as findNestedTemplateTreeDefect, ai as s3BucketArn, an as isRedactedRecordedValue, ao as toCfnInteger, ar as planTagDiff, as as dynamicReferenceTokens, b as lookupEachName, bo as withRetry, br as getCurrentResourceSecrets, bt as getNestedRevertRun, c as renderNestedTemplateTreeDefect, ci as s3BucketRegionalDomainName, co as coerceCfnInteger, cr as tagMapAsList, da as refuseMalformedNestedChildOutputs, dl as derivePartitionAndUrlSuffix, do as configStringRefusal, dr as stringifyIfAssigned, ds as recoverMaskedOutput, er as reserveStackCreateToken, es as redactSecretsForState, et as getPriorAttempts, fo as readConfigString, fs as physicalNameCopiesOf, gi as getAccountInfo, go as requireConfigString, gs as carriesSecretMask, ho as requireConfigObject, ii as isSettledInstanceState, in as REDACTED_DELETE_ADDRESS_SKIP_REASON, io as isWarmThroughputDecrease, ir as DBPROXY_TAG_OPTIONS, ja as refuseMalformedResourcesForDestroy, ki as passedParameterClassesOf, li as s3BucketWebsiteUrl, lo as configBooleanRefusal, lr as tagPlanWarning, mo as requireConfigArray, nn as getCurrentProducerRegions, no as WARM_THROUGHPUT_MEMBERS, nr as acquireIdempotencyToken, o as isAbsoluteAssetPath, oc as rewriteTemplateAssetReferences, oi as s3BucketDomainName, on as redactedDeleteAddressFields, oo as toFiniteNumber, or as readTagList, po as replayWarn, ps as recordAttributeIdCopy, q as INDEX_SETTLE_POLL_INTERVAL_MS, qa as withoutSilentDropProperties, ro as coerceWarmThroughput$1, rr as DBPROXY_TAGS_WHAT, rs as withoutPhysicalNameCopies, s as listNestedTemplateRows, si as s3BucketDualStackDomainName, sl as decodeListingKey, sn as redactedDeleteAddressSkip, so as coerceCfnBoolean, sr as refuseMalformedDesiredTags, t as DeployEngine, tc as stringifyValue, tt as markRefusedBeforeApplying, ul as canonicalizeRegion, uo as configIntegerRefusal, ur as definedAttributes, v as chunks, wl as resolveAssemblyPath, x as withApiLimit, xl as describeFileReadFailure, xo as canonicalLambdaFunctionName, y as isAccessDeniedError, z as DynamoDBGlobalTableProvider, zr as observeThenDisableInstanceApiTermination } from "./deploy-engine-C8Fy0Qt4.js";
6
+ import { n as collectInlinePolicyNamesManagedBySiblings, r as IamCreateClientCache, t as IAMRoleProvider } from "./iam-role-provider-BoSkqeaq.js";
7
+ import { a as canonicalizeIpProtocolValue, i as resolveSecretDerivedPrincipals, n as runDestroyForStack, o as resolvedResourceTimeoutMs, r as isResolvableSecretPrincipalList, t as canonicalizeIpv4Cidr } from "./program-BqJFGIHe.js";
8
+ import { RDSProvider } from "./rds-provider-Bbn1D00T.js";
9
+ import { NeptuneProvider } from "./neptune-provider-23ajlPbJ.js";
10
+ import { ASGProvider } from "./asg-provider-DvX7fChd.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";
14
14
  import { CreateQueueCommand, DeleteQueueCommand, GetQueueAttributesCommand, GetQueueUrlCommand, ListQueueTagsCommand, QueueDoesNotExist, SQSClient, SetQueueAttributesCommand, TagQueueCommand, UntagQueueCommand } from "@aws-sdk/client-sqs";
15
- import { CreateTopicCommand, DeleteTopicCommand, GetSubscriptionAttributesCommand, GetTopicAttributesCommand, InvalidParameterException, ListSubscriptionsByTopicCommand, ListTagsForResourceCommand, ListTopicsCommand, NotFoundException, SNSClient, SetTopicAttributesCommand, SubscribeCommand, TagResourceCommand, UnsubscribeCommand, UntagResourceCommand } from "@aws-sdk/client-sns";
15
+ import { CreateTopicCommand, DeleteTopicCommand, GetSubscriptionAttributesCommand, GetTopicAttributesCommand, InvalidParameterException, ListSubscriptionsByTopicCommand, ListTagsForResourceCommand, ListTopicsCommand, NotFoundException, SNSClient, SetSubscriptionAttributesCommand, SetTopicAttributesCommand, SubscribeCommand, TagResourceCommand, UnsubscribeCommand, UntagResourceCommand } from "@aws-sdk/client-sns";
16
16
  import { AddPermissionCommand, CreateEventSourceMappingCommand, CreateFunctionCommand, CreateFunctionUrlConfigCommand, DeleteEventSourceMappingCommand, DeleteFunctionCodeSigningConfigCommand, DeleteFunctionCommand, DeleteFunctionConcurrencyCommand, DeleteFunctionEventInvokeConfigCommand, DeleteFunctionUrlConfigCommand, DeleteLayerVersionCommand, GetEventSourceMappingCommand, GetFunctionCodeSigningConfigCommand, GetFunctionCommand, GetFunctionConcurrencyCommand, GetFunctionEventInvokeConfigCommand, GetFunctionRecursionConfigCommand, GetFunctionUrlConfigCommand, GetLayerVersionByArnCommand, GetPolicyCommand as GetPolicyCommand$1, GetRuntimeManagementConfigCommand, LambdaClient, ListEventSourceMappingsCommand, ListLayerVersionsCommand, ListTagsCommand, PublishLayerVersionCommand, PutFunctionCodeSigningConfigCommand, PutFunctionConcurrencyCommand, PutFunctionEventInvokeConfigCommand, PutFunctionRecursionConfigCommand, PutRuntimeManagementConfigCommand, RemovePermissionCommand, ResourceNotFoundException, TagResourceCommand as TagResourceCommand$1, UntagResourceCommand as UntagResourceCommand$1, UpdateEventSourceMappingCommand, UpdateFunctionCodeCommand, UpdateFunctionConfigurationCommand, UpdateFunctionUrlConfigCommand, waitUntilFunctionActiveV2, waitUntilFunctionUpdatedV2 } from "@aws-sdk/client-lambda";
17
17
  import { GetCallerIdentityCommand, STSClient } from "@aws-sdk/client-sts";
18
18
  import { AllocateAddressCommand, AssociateAddressCommand, AssociateIamInstanceProfileCommand, AssociateRouteTableCommand, AttachInternetGatewayCommand, AuthorizeSecurityGroupEgressCommand, AuthorizeSecurityGroupIngressCommand, CreateInternetGatewayCommand, CreateNatGatewayCommand, CreateNetworkAclCommand, CreateNetworkAclEntryCommand, CreateRouteCommand, CreateRouteTableCommand, CreateSecurityGroupCommand, CreateSubnetCommand, CreateTagsCommand, CreateVpcCommand, DeleteInternetGatewayCommand, DeleteNatGatewayCommand, DeleteNetworkAclCommand, DeleteNetworkAclEntryCommand, DeleteNetworkInterfaceCommand, DeleteRouteCommand, DeleteRouteTableCommand, DeleteSecurityGroupCommand, DeleteSubnetCommand, DeleteTagsCommand, DeleteVpcCommand, DescribeAddressesCommand, DescribeAvailabilityZonesCommand, DescribeIamInstanceProfileAssociationsCommand, DescribeInstanceAttributeCommand, DescribeInstanceCreditSpecificationsCommand, DescribeInstancesCommand, DescribeInternetGatewaysCommand, DescribeNatGatewaysCommand, DescribeNetworkAclsCommand, DescribeNetworkInterfacesCommand, DescribeRouteTablesCommand, DescribeSecurityGroupRulesCommand, DescribeSecurityGroupsCommand, DescribeSubnetsCommand, DescribeVolumesCommand, DescribeVpcAttributeCommand, DescribeVpcsCommand, DetachInternetGatewayCommand, DisassociateAddressCommand, DisassociateRouteTableCommand, EC2Client, ModifyInstanceAttributeCommand, ModifyInstanceCreditSpecificationCommand, ModifyInstanceMetadataOptionsCommand, ModifySubnetAttributeCommand, ModifyVpcAttributeCommand, MonitorInstancesCommand, ReleaseAddressCommand, ReplaceNetworkAclAssociationCommand, RevokeSecurityGroupEgressCommand, RevokeSecurityGroupIngressCommand, RunInstancesCommand, TerminateInstancesCommand, UnmonitorInstancesCommand, waitUntilInstanceRunning, waitUntilInstanceTerminated, waitUntilNatGatewayAvailable, waitUntilNatGatewayDeleted } from "@aws-sdk/client-ec2";
@@ -6723,6 +6723,45 @@ function mapDeliveryStatusLogging(attrs, stateCaseMap = /* @__PURE__ */ new Map(
6723
6723
  //#endregion
6724
6724
  //#region src/provisioning/providers/sns-subscription-provider.ts
6725
6725
  const SNS_SUBSCRIPTION_DELETE_THREW_REASON = "the Unsubscribe call did not complete, so the old subscription is unproven";
6726
+ const MUTABLE_ATTRIBUTES = [
6727
+ "RawMessageDelivery",
6728
+ "FilterPolicy",
6729
+ "FilterPolicyScope",
6730
+ "RedrivePolicy",
6731
+ "DeliveryPolicy",
6732
+ "ReplayPolicy",
6733
+ "SubscriptionRoleArn"
6734
+ ];
6735
+ const RESET_VALUES = {
6736
+ RawMessageDelivery: "false",
6737
+ FilterPolicy: "",
6738
+ FilterPolicyScope: "MessageAttributes",
6739
+ RedrivePolicy: ""
6740
+ };
6741
+ const CREATE_ONLY_FIELDS = [
6742
+ "TopicArn",
6743
+ "Protocol",
6744
+ "Endpoint"
6745
+ ];
6746
+ function toAttributeValue(key, value) {
6747
+ if (value === void 0) return void 0;
6748
+ if (key === "FilterPolicy" || key === "RedrivePolicy" || key === "DeliveryPolicy" || key === "ReplayPolicy") return typeof value === "string" ? value : JSON.stringify(value);
6749
+ return stringifyValue(value);
6750
+ }
6751
+ function sameAttributeValue(name, desired, current) {
6752
+ if (current === void 0) return desired === RESET_VALUES[name];
6753
+ if (desired === current) return true;
6754
+ try {
6755
+ return JSON.stringify(JSON.parse(desired)) === JSON.stringify(JSON.parse(current));
6756
+ } catch {
6757
+ return false;
6758
+ }
6759
+ }
6760
+ function filterPolicyCleared(plan, current) {
6761
+ const planned = plan.find(([name]) => name === "FilterPolicy");
6762
+ if (planned !== void 0) return planned[1] === "";
6763
+ return current["FilterPolicy"] === void 0 || current["FilterPolicy"] === "";
6764
+ }
6726
6765
  var SNSSubscriptionProvider = class {
6727
6766
  snsClient;
6728
6767
  logger = getLogger().child("SNSSubscriptionProvider");
@@ -6743,7 +6782,7 @@ var SNSSubscriptionProvider = class {
6743
6782
  const awsClients = getAwsClients();
6744
6783
  this.snsClient = awsClients.sns;
6745
6784
  }
6746
- async create(logicalId, resourceType, properties) {
6785
+ async create(logicalId, resourceType, properties, context) {
6747
6786
  this.logger.debug(`Creating SNS subscription ${logicalId}`);
6748
6787
  const topicArn = properties["TopicArn"];
6749
6788
  const protocol = properties["Protocol"];
@@ -6781,16 +6820,71 @@ var SNSSubscriptionProvider = class {
6781
6820
  attributes: definedAttributes({ Arn: response.SubscriptionArn?.startsWith("arn:") ? response.SubscriptionArn : void 0 })
6782
6821
  };
6783
6822
  } catch (error) {
6784
- const cause = error instanceof Error ? error : void 0;
6785
- throw new ProvisioningError(`Failed to create SNS subscription ${logicalId}: ${error instanceof Error ? error.message : String(error)}`, resourceType, logicalId, void 0, cause);
6823
+ throw this.wrapMaskedAwsCallError(maskerOrIdentity(context?.maskSecrets), error, `Failed to create SNS subscription ${logicalId}`, resourceType, logicalId, void 0);
6786
6824
  }
6787
6825
  }
6788
- async update(logicalId, physicalId, resourceType, properties, _previousProperties) {
6826
+ async update(logicalId, physicalId, resourceType, properties, _previousProperties, context) {
6789
6827
  this.logger.debug(`Updating SNS subscription ${logicalId}: ${physicalId}`);
6828
+ const plan = await this.planInPlaceUpdate(logicalId, physicalId, resourceType, properties, context);
6829
+ if (plan === void 0) return this.replace(logicalId, physicalId, resourceType, properties, context);
6830
+ const mask = maskerOrIdentity(context?.maskSecrets);
6831
+ for (const [name, value] of plan) try {
6832
+ await this.snsClient.send(new SetSubscriptionAttributesCommand({
6833
+ SubscriptionArn: physicalId,
6834
+ AttributeName: name,
6835
+ AttributeValue: value
6836
+ }));
6837
+ } catch (error) {
6838
+ throw this.wrapMaskedAwsCallError(mask, error, `Failed to update SNS subscription ${logicalId} (attribute ${name})`, resourceType, logicalId, physicalId);
6839
+ }
6840
+ const changed = plan.map(([name]) => name).join(", ") || "no attribute differed";
6841
+ this.logger.debug(safeMsg`Updated SNS subscription ${logicalId} in place: ${changed}`);
6842
+ return {
6843
+ physicalId,
6844
+ wasReplaced: false,
6845
+ attributes: definedAttributes({ Arn: physicalId.startsWith("arn:") ? physicalId : void 0 })
6846
+ };
6847
+ }
6848
+ async planInPlaceUpdate(logicalId, physicalId, resourceType, properties, context) {
6849
+ if (physicalId === "PendingConfirmation" || physicalId === "pending confirmation") return;
6850
+ let current;
6851
+ try {
6852
+ current = (await this.snsClient.send(new GetSubscriptionAttributesCommand({ SubscriptionArn: physicalId })))?.Attributes;
6853
+ } catch (error) {
6854
+ if (error instanceof NotFoundException) return void 0;
6855
+ throw this.wrapMaskedAwsCallError(maskerOrIdentity(context?.maskSecrets), error, `Failed to update SNS subscription ${logicalId}: could not read its attributes`, resourceType, logicalId, physicalId);
6856
+ }
6857
+ if (current === void 0 || current["PendingConfirmation"] === "true") return void 0;
6858
+ for (const field of CREATE_ONLY_FIELDS) {
6859
+ const desired = properties[field];
6860
+ if (desired !== void 0 && stringifyValue(desired) !== current[field]) return void 0;
6861
+ }
6862
+ const plan = [];
6863
+ for (const name of MUTABLE_ATTRIBUTES) {
6864
+ const desired = toAttributeValue(name, properties[name]);
6865
+ const now = current[name];
6866
+ if (desired !== void 0) {
6867
+ if (!sameAttributeValue(name, desired, now)) plan.push([name, desired]);
6868
+ continue;
6869
+ }
6870
+ if (now === void 0 || now === "") continue;
6871
+ if (name === "FilterPolicyScope" && filterPolicyCleared(plan, current)) continue;
6872
+ const reset = RESET_VALUES[name];
6873
+ if (reset === void 0) return void 0;
6874
+ if (now !== reset) plan.push([name, reset]);
6875
+ }
6876
+ const policy = plan.find(([name]) => name === "FilterPolicy");
6877
+ if (policy !== void 0 && policy[1] !== "" && plan.some(([name]) => name === "FilterPolicyScope")) return;
6878
+ return plan;
6879
+ }
6880
+ wrapMaskedAwsCallError(mask, error, prefix, resourceType, logicalId, physicalId) {
6881
+ return wrapMaskedAwsError(mask, error, (text) => new ProvisioningError(`${prefix}: ${text}`, resourceType, logicalId, physicalId, error instanceof Error ? error : void 0));
6882
+ }
6883
+ async replace(logicalId, physicalId, resourceType, properties, context) {
6790
6884
  let deleteResult = void 0;
6791
6885
  let deleteThrew = false;
6792
6886
  try {
6793
- deleteResult = await this.delete(logicalId, physicalId, resourceType);
6887
+ deleteResult = await this.delete(logicalId, physicalId, resourceType, void 0, { expectedRegion: context?.expectedRegion });
6794
6888
  } catch (error) {
6795
6889
  deleteThrew = true;
6796
6890
  this.logger.warn(`Failed to delete old subscription ${physicalId} during update: ${safeStringify(error)}`);
@@ -6800,7 +6894,7 @@ var SNSSubscriptionProvider = class {
6800
6894
  this.logger.warn(`Cannot replace SNS subscription ${logicalId}: the old subscription ${physicalId} was not deleted — ${notDeletedReason}`);
6801
6895
  throw markNonRetryable(new ProvisioningError(`Cannot replace SNS subscription ${logicalId}: cdkd could not delete the old subscription, and creating the replacement would leave both subscribed to the topic and deliver every message twice. See the warning naming ${logicalId} for the recorded physical id and the cause. Usually the Unsubscribe itself failed (a throttle, a denied sns:Unsubscribe) and the state record is FINE — clear that cause and re-run, or remove the old subscription in AWS by hand. Repair the state record only when the warning says the recorded physical id is malformed, which is the latent skip arm rather than this one.`, resourceType, logicalId, physicalId));
6802
6896
  }
6803
- const createResult = await this.create(logicalId, resourceType, properties);
6897
+ const createResult = await this.create(logicalId, resourceType, properties, context?.maskSecrets === void 0 ? void 0 : { maskSecrets: context.maskSecrets });
6804
6898
  return {
6805
6899
  physicalId: createResult.physicalId,
6806
6900
  wasReplaced: true,
@@ -7215,6 +7309,16 @@ var LambdaCreateClientCache = class {
7215
7309
 
7216
7310
  //#endregion
7217
7311
  //#region src/provisioning/providers/lambda-function-provider.ts
7312
+ function isFunctionName(id) {
7313
+ return /^[A-Za-z0-9_-]{1,64}$/.test(id);
7314
+ }
7315
+ function functionIdentityToken(arn, lastModified) {
7316
+ if (typeof arn !== "string" || arn === "") return void 0;
7317
+ if (typeof lastModified !== "string" || lastModified === "") return void 0;
7318
+ const ms = Date.parse(lastModified);
7319
+ if (Number.isNaN(ms)) return void 0;
7320
+ return `${arn}@${ms}`;
7321
+ }
7218
7322
  const SELF_NEEDLE_MIN_LENGTH$1 = 3;
7219
7323
  function lambdaOperationSinks(logger, maskSecrets, namePairs, bag) {
7220
7324
  const base = createMaskedLogSinks(logger, maskSecrets);
@@ -7450,6 +7554,7 @@ var LambdaFunctionProvider = class {
7450
7554
  refuseImageFunctionUnsupported(logicalId, resourceType, properties);
7451
7555
  let functionCreated = false;
7452
7556
  let createdFunctionName;
7557
+ let createdFunctionIdentity;
7453
7558
  const postCreateCleanup = { deleted: false };
7454
7559
  try {
7455
7560
  const tags = properties["Tags"] ? Object.fromEntries(desiredTags.map((tag) => [tag.Key, tag.Value])) : void 0;
@@ -7483,6 +7588,7 @@ var LambdaFunctionProvider = class {
7483
7588
  const response = await (await this.createClient.get()).send(new CreateFunctionCommand(createParams));
7484
7589
  functionCreated = true;
7485
7590
  createdFunctionName = response.FunctionName || functionName;
7591
+ createdFunctionIdentity = functionIdentityToken(response.FunctionArn, response.LastModified);
7486
7592
  const recursiveLoop = properties["RecursiveLoop"];
7487
7593
  if (recursiveLoop !== void 0) await this.applyPostCreateConfig(() => this.lambdaClient.send(new PutFunctionRecursionConfigCommand({
7488
7594
  FunctionName: functionName,
@@ -7518,6 +7624,7 @@ var LambdaFunctionProvider = class {
7518
7624
  maxDelay: 5
7519
7625
  }, { FunctionName: functionName });
7520
7626
  await this.putRuntimeManagementConfig(functionName, runtimeManagementConfig);
7627
+ createdFunctionIdentity = void 0;
7521
7628
  }, {
7522
7629
  apiName: "PutRuntimeManagementConfig",
7523
7630
  propertyName: "RuntimeManagementConfig",
@@ -7539,7 +7646,7 @@ var LambdaFunctionProvider = class {
7539
7646
  if (functionCreated) markAuxiliaryFailure(error, logicalId);
7540
7647
  const cause = error instanceof Error ? error : void 0;
7541
7648
  const thrown = this.wrapMaskedError(log, error, (text) => new ProvisioningError(`Failed to create Lambda function ${logicalId}: ${text}`, resourceType, logicalId, functionName, cause ?? new Error(String(error))));
7542
- if (createdFunctionName !== void 0 && !postCreateCleanup.deleted) markCreatedBeforeFailure(thrown, logicalId, resourceType, createdFunctionName);
7649
+ if (createdFunctionName !== void 0 && !postCreateCleanup.deleted) markCreatedBeforeFailure(thrown, logicalId, resourceType, createdFunctionName, createdFunctionIdentity);
7543
7650
  throw thrown;
7544
7651
  }
7545
7652
  }
@@ -7736,6 +7843,7 @@ var LambdaFunctionProvider = class {
7736
7843
  if (error instanceof ResourceNotFoundException) {
7737
7844
  const clientRegion = await this.lambdaClient.config.region();
7738
7845
  assertRegionMatch(clientRegion, context?.expectedRegion, resourceType, logicalId, physicalId);
7846
+ this.logFunctionGone(logicalId, physicalId, context);
7739
7847
  return;
7740
7848
  }
7741
7849
  this.logger.warn(`Pre-delete VPC detach failed for ${physicalId}: ${describeAwsFailure(error).detail} — continuing with delete`);
@@ -7749,7 +7857,7 @@ var LambdaFunctionProvider = class {
7749
7857
  if (error instanceof ResourceNotFoundException) {
7750
7858
  const clientRegion = await this.lambdaClient.config.region();
7751
7859
  assertRegionMatch(clientRegion, context?.expectedRegion, resourceType, logicalId, physicalId);
7752
- this.logger.debug(`Lambda function ${physicalId} does not exist, skipping deletion`);
7860
+ this.logFunctionGone(logicalId, physicalId, context);
7753
7861
  return;
7754
7862
  }
7755
7863
  const cause = error instanceof Error ? error : void 0;
@@ -7974,6 +8082,45 @@ var LambdaFunctionProvider = class {
7974
8082
  }
7975
8083
  return (crc ^ 4294967295) >>> 0;
7976
8084
  }
8085
+ logFunctionGone(logicalId, physicalId, context) {
8086
+ if (context?.failedCreateOrphan === true) this.logger.info(safeMsg` Lambda function ${physicalId} (${logicalId}), which a failed deploy created, is already gone; nothing to delete`);
8087
+ else this.logger.debug(`Lambda function ${physicalId} does not exist, skipping deletion`);
8088
+ }
8089
+ async isSameResource(journaledPhysicalId, record, resourceType, context) {
8090
+ if (resourceType !== "AWS::Lambda::Function") return "unknown";
8091
+ if (!isFunctionName(journaledPhysicalId) || !isFunctionName(record.physicalId)) return "unknown";
8092
+ if (journaledPhysicalId === record.physicalId) return "same";
8093
+ if (journaledPhysicalId.toLowerCase() === record.physicalId.toLowerCase()) return "unknown";
8094
+ if (await this.lambdaClient.config.region() !== context.expectedRegion) return "unknown";
8095
+ const recordFn = await this.readFunctionIfExists(record.physicalId);
8096
+ if (recordFn === void 0) return "unknown";
8097
+ const journaledFn = await this.readFunctionIfExists(journaledPhysicalId);
8098
+ if (journaledFn === void 0) return "different";
8099
+ return journaledFn.arn === recordFn.arn ? "same" : "different";
8100
+ }
8101
+ async resourceIdentity(physicalId, resourceType, context) {
8102
+ if (resourceType !== "AWS::Lambda::Function" || !isFunctionName(physicalId)) return;
8103
+ if (await this.lambdaClient.config.region() !== context.expectedRegion) return void 0;
8104
+ const live = await this.readFunctionIfExists(physicalId);
8105
+ if (live === void 0) return RESOURCE_NOT_FOUND;
8106
+ return functionIdentityToken(live.arn, live.lastModified);
8107
+ }
8108
+ async readFunctionIfExists(functionName) {
8109
+ let response;
8110
+ try {
8111
+ response = await this.lambdaClient.send(new GetFunctionCommand({ FunctionName: functionName }));
8112
+ } catch (error) {
8113
+ if (error instanceof ResourceNotFoundException) return void 0;
8114
+ throw error;
8115
+ }
8116
+ if (response.Configuration?.FunctionName !== functionName) throw new Error("GetFunction answered for another function than the one asked for");
8117
+ const arn = response.Configuration.FunctionArn;
8118
+ if (typeof arn !== "string" || arn === "") throw new Error("GetFunction returned no FunctionArn");
8119
+ return {
8120
+ arn,
8121
+ lastModified: response.Configuration.LastModified
8122
+ };
8123
+ }
7977
8124
  async getAttribute(physicalId, _resourceType, attributeName) {
7978
8125
  if (attributeName !== "Arn" && attributeName !== "SnapStartResponse.ApplyOn" && attributeName !== "SnapStartResponse.OptimizationStatus") return;
7979
8126
  try {
@@ -44382,6 +44529,15 @@ var NestedStackProvider = class {
44382
44529
  if (!childStateData) throw markNonRetryable(/* @__PURE__ */ new Error(`Child stack state ${displayStackName(childStackName)} not found after deploy — NestedStackProvider invariant violated.`));
44383
44530
  refuseMalformedNestedChildOutputs(childStateData.state, childStackName, childRegion, runAccountOf(ctx));
44384
44531
  const attributes = this.buildOutputsAttributes(childStateData.state.outputs ?? {});
44532
+ const rowSecrets = getCurrentResourceSecrets();
44533
+ if (rowSecrets !== void 0) {
44534
+ const childResources = childStateData.state.resources;
44535
+ const ids = childResources !== null && typeof childResources === "object" ? Object.values(childResources).map((record) => record?.physicalId).filter((id) => typeof id === "string" && id !== "") : [];
44536
+ for (const value of Object.values(attributes)) {
44537
+ if (typeof value !== "string") continue;
44538
+ for (const id of ids) if (value.includes(id)) recordAttributeIdCopy(rowSecrets, id);
44539
+ }
44540
+ }
44385
44541
  const noEchoAttributeNames = [];
44386
44542
  const identity = credentialFingerprint(ambientCredentialConfig());
44387
44543
  for (const [outputKey, persisted] of Object.entries(childStateData.state.outputs ?? {})) {
@@ -44865,4 +45021,4 @@ var ACMCertificateProvider = class {
44865
45021
 
44866
45022
  //#endregion
44867
45023
  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, LambdaPermissionProvider, LambdaUrlProvider, 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 };
44868
- //# sourceMappingURL=provider-classes-B74Nt7nS.js.map
45024
+ //# sourceMappingURL=provider-classes-CoJI5423.js.map