@go-to-k/cdkd 0.301.8 → 0.301.10

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,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 markReplayMayCollide, $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 markNameCollision, 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, Zt as withPasteableAwsProfile, _ as RecentIdSet, _t as createMaskedLogSinks, a as onlySecretDerived, ar as isExplicitDenyError, at as startInterruptWatch, b as isInsideWindow, bn as ResourceUpdateNotSupportedError, bt as maskDeep, c as recordedPrincipalsRepair, cr as isTransientServerError, ct as canonicalizeRoute53QueryName, dr as isMarkedNonRetryable, dt as compositeIdSkipResult, en as clientDefaultsFor, er as relayedNameCollision, et as renderDisableCommand, fr as isThrottlingError, ft as logicalIdShown, g as AmbiguousCreateLatch, gt as stateOrphanRecordRemedy, h as AMBIGUOUS_LATCH_TTL_MS, hr as wrapMaskedAwsError, ht as segmentAfterAnchor, i as holdsSecretDerivedEntry, in as CdkdError, ir as isAmbiguousOutcomeError, it as isInterruptedWaitError, j as normalizeAwsTagsToCfn, jt as markAuxiliaryFailure, k as isPlainImportValue, lt as compositeIdFormatMessage, mr as markRedactedCause, nn as AccountIdUnavailableError, o as readPrincipalLists, ot as ElapsedBudgetRegistry, p as withRemovalDefaults, pr as markNonRetryable, pt as packCompositeId, q as userPoolProtectionSite, qn as isNameCollisionError, qt as injectiveKeyPrefix, r as SECRET_DERIVED_READ_LIVE, sr as isRetryableTransientError, tn as credentialFingerprint, tr as explicitDenyPolicyKind, u as clearOnUpdateRemoval, ur as THROTTLING_ERROR_NAMES, 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-DJmfxbko.js";
4
4
  import { s as ambientRegion } from "./aws-client-defaults-DBXBcg0J.js";
5
- import { $i as accountArgs, Ao as replayWarn, Bl as displayAssemblyPath, Bo as sameLambdaFunctionAddress, C as getPriorAttempts, Cc as rewriteTemplateAssetReferences, Cn as awaitInFlightSibling, Co as toFiniteNumber, Dn as replacedDeleteFailureVerdict, Do as configIntegerRefusal, Dr as waitForLambdaFunctionActive, Dt as withApiLimit, Eo as configBooleanRefusal, Es as dynamicReferenceTokens, Et as lookupEachName, F as listNestedTemplateRows, Gr as isWaitAbandonedError, Hl as resolveAssemblyPath, I as renderNestedTemplateTreeDefect, Ja as refuseMalformedResourcesForDestroy, Jr as ec2InstanceProtectionSite, Jt as redactedDeleteAddressFields, Ki as passedParameterClassesOf, Kn as secretNamedAttributeNamesOf, Kr as markWaitAbandoned, Kt as REDACTED_DELETE_ADDRESS_SKIP_REASON, Lo as withRetry, Lr as slowCcOperationTimeoutMs, Ls as carriesSecretMask, Mo as requireConfigObject, Ms as recoverMaskedOutput, N as findNestedTemplateTreeDefect, Ni as getAccountInfo, No as requireConfigString, Ns as physicalNameCopiesOf, Oa as refuseMalformedNestedChildOutputs, Ol as canonicalizeRegion, Oo as configStringRefusal, P as isAbsoluteAssetPath, Ps as recordAttributeIdCopy, Qo as passedNoEchoParametersOf, Qr as reEnableInstanceApiTermination, Ro as canonicalLambdaFunctionName, Rr as unchangedBehindSecretReference, S as isTruthyCfnBoolean, So as toCfnInteger, Tl as decodeListingKey, Tn as getStackRecords, To as coerceCfnInteger, Tt as isAccessDeniedError, Ui as parseWebACLArn, Ur as deleteSkipReason, Vl as renderAssemblyPathEscape, 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, as as redactForState, b as S3_AUTO_DELETE_OBJECTS_TAG, bo as coerceWarmThroughput$1, br as definedAttributes, 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, is as markSameGenerationBag, jo as requireConfigArray, jr as getCurrentResourceSecrets, kl as derivePartitionAndUrlSuffix, 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 recordReferenceProvenanceEntry, 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, ss as snapshotPassProvenance, t as DeployEngine, u as beginDeleteWait, uo as withoutSilentDropProperties, ur as acquireIdempotencyToken, us as hasMaskableValues, v as waitForIndexesSettled, vc as stringifyValue, vr as tagMapAsList, w as markRefusedBeforeApplying, wo as coerceCfnBoolean, ws as withoutPhysicalNameCopies, wt as chunks, x as hasCdkAutoDeleteTag, xo as isWarmThroughputDecrease, xr as stringifyIfAssigned, y as ECR_AUTO_DELETE_IMAGES_TAG, yo as WARM_THROUGHPUT_MEMBERS, yr as tagPlanWarning, zl as describeFileReadFailure, zo as lambdaFunctionNameForMask } from "./deploy-engine-6bGIDa7Z.js";
6
- import { n as collectInlinePolicyNamesManagedBySiblings, r as IamCreateClientCache, t as IAMRoleProvider } from "./iam-role-provider-CvfdjJBv.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-Bji4lco2.js";
8
- import { RDSProvider } from "./rds-provider-BTabgCz5.js";
9
- import { NeptuneProvider } from "./neptune-provider-CrH00sHx.js";
10
- import { ASGProvider } from "./asg-provider-BHNhL4VV.js";
5
+ import { $i as accountArgs, Ao as replayWarn, Bl as displayAssemblyPath, Bo as sameLambdaFunctionAddress, C as getPriorAttempts, Cc as rewriteTemplateAssetReferences, Cn as awaitInFlightSibling, Co as toFiniteNumber, Dn as replacedDeleteFailureVerdict, Do as configIntegerRefusal, Dr as waitForLambdaFunctionActive, Dt as withApiLimit, Eo as configBooleanRefusal, Es as dynamicReferenceTokens, Et as lookupEachName, F as listNestedTemplateRows, Gr as isWaitAbandonedError, Hl as resolveAssemblyPath, I as renderNestedTemplateTreeDefect, Ja as refuseMalformedResourcesForDestroy, Jr as ec2InstanceProtectionSite, Jt as redactedDeleteAddressFields, Ki as passedParameterClassesOf, Kn as secretNamedAttributeNamesOf, Kr as markWaitAbandoned, Kt as REDACTED_DELETE_ADDRESS_SKIP_REASON, Lo as withRetry, Lr as slowCcOperationTimeoutMs, Ls as carriesSecretMask, Mo as requireConfigObject, Ms as recoverMaskedOutput, N as findNestedTemplateTreeDefect, Ni as getAccountInfo, No as requireConfigString, Ns as physicalNameCopiesOf, Oa as refuseMalformedNestedChildOutputs, Ol as canonicalizeRegion, Oo as configStringRefusal, P as isAbsoluteAssetPath, Ps as recordAttributeIdCopy, Qo as passedNoEchoParametersOf, Qr as reEnableInstanceApiTermination, Ro as canonicalLambdaFunctionName, Rr as unchangedBehindSecretReference, S as isTruthyCfnBoolean, So as toCfnInteger, Tl as decodeListingKey, Tn as getStackRecords, To as coerceCfnInteger, Tt as isAccessDeniedError, Ui as parseWebACLArn, Ur as deleteSkipReason, Vl as renderAssemblyPathEscape, 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, as as redactForState, b as S3_AUTO_DELETE_OBJECTS_TAG, bo as coerceWarmThroughput$1, br as definedAttributes, 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, is as markSameGenerationBag, jo as requireConfigArray, jr as getCurrentResourceSecrets, kl as derivePartitionAndUrlSuffix, 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 recordReferenceProvenanceEntry, 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, ss as snapshotPassProvenance, t as DeployEngine, u as beginDeleteWait, uo as withoutSilentDropProperties, ur as acquireIdempotencyToken, us as hasMaskableValues, v as waitForIndexesSettled, vc as stringifyValue, vr as tagMapAsList, w as markRefusedBeforeApplying, wo as coerceCfnBoolean, ws as withoutPhysicalNameCopies, wt as chunks, x as hasCdkAutoDeleteTag, xo as isWarmThroughputDecrease, xr as stringifyIfAssigned, y as ECR_AUTO_DELETE_IMAGES_TAG, yo as WARM_THROUGHPUT_MEMBERS, yr as tagPlanWarning, zl as describeFileReadFailure, zo as lambdaFunctionNameForMask } from "./deploy-engine-BOHXbSq5.js";
6
+ import { n as collectInlinePolicyNamesManagedBySiblings, r as IamCreateClientCache, t as IAMRoleProvider } from "./iam-role-provider-3CUpHJfg.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-BGo747Co.js";
8
+ import { RDSProvider } from "./rds-provider-CaPSidBQ.js";
9
+ import { NeptuneProvider } from "./neptune-provider-U_LOS8jM.js";
10
+ import { ASGProvider } from "./asg-provider-BEProOyz.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";
@@ -15,7 +15,7 @@ import { CreateQueueCommand, DeleteQueueCommand, GetQueueAttributesCommand, GetQ
15
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
- 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";
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, ReplaceNetworkAclEntryCommand, ReplaceRouteCommand, RevokeSecurityGroupEgressCommand, RevokeSecurityGroupIngressCommand, RunInstancesCommand, TerminateInstancesCommand, UnmonitorInstancesCommand, waitUntilInstanceRunning, waitUntilInstanceTerminated, waitUntilNatGatewayAvailable, waitUntilNatGatewayDeleted } from "@aws-sdk/client-ec2";
19
19
  import { CreateTableCommand, DeleteResourcePolicyCommand, DeleteTableCommand, DescribeContinuousBackupsCommand, DescribeContributorInsightsCommand, DescribeKinesisStreamingDestinationCommand, DescribeTableCommand, DescribeTimeToLiveCommand, DisableKinesisStreamingDestinationCommand, DynamoDBClient, EnableKinesisStreamingDestinationCommand, GetResourcePolicyCommand, ListTagsOfResourceCommand, PolicyNotFoundException, PutResourcePolicyCommand, ResourceNotFoundException as ResourceNotFoundException$1, TagResourceCommand as TagResourceCommand$2, UntagResourceCommand as UntagResourceCommand$2, UpdateContinuousBackupsCommand, UpdateContributorInsightsCommand, UpdateTableCommand, UpdateTimeToLiveCommand } from "@aws-sdk/client-dynamodb";
20
20
  import { APIGatewayClient, CreateAuthorizerCommand, CreateDeploymentCommand, CreateResourceCommand, CreateStageCommand, DeleteAuthorizerCommand, DeleteDeploymentCommand, DeleteMethodCommand, DeleteResourceCommand, DeleteStageCommand, GetAccountCommand, GetAuthorizerCommand, GetAuthorizersCommand, GetDeploymentCommand, GetDeploymentsCommand, GetMethodCommand, GetResourceCommand, GetStageCommand, NotFoundException as NotFoundException$1, PutIntegrationCommand, PutIntegrationResponseCommand, PutMethodCommand, PutMethodResponseCommand, TagResourceCommand as TagResourceCommand$3, UntagResourceCommand as UntagResourceCommand$3, UpdateAccountCommand, UpdateAuthorizerCommand, UpdateMethodCommand, UpdateStageCommand } from "@aws-sdk/client-api-gateway";
21
21
  import { CreateEventBusCommand, DeleteEventBusCommand, DeleteRuleCommand, DescribeEventBusCommand, DescribeRuleCommand, EventBridgeClient, ListRulesCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$1, ListTargetsByRuleCommand, PutPermissionCommand, PutRuleCommand, PutTargetsCommand, RemoveTargetsCommand, ResourceNotFoundException as ResourceNotFoundException$2, TagResourceCommand as TagResourceCommand$4, UntagResourceCommand as UntagResourceCommand$4, UpdateEventBusCommand } from "@aws-sdk/client-eventbridge";
@@ -15697,6 +15697,39 @@ function narrowRouteDestinations(properties) {
15697
15697
  narrowed
15698
15698
  };
15699
15699
  }
15700
+ function routeTargetParams(properties) {
15701
+ return {
15702
+ CarrierGatewayId: properties["CarrierGatewayId"] ?? void 0,
15703
+ CoreNetworkArn: properties["CoreNetworkArn"] ?? void 0,
15704
+ GatewayId: properties["GatewayId"] ?? void 0,
15705
+ LocalGatewayId: properties["LocalGatewayId"] ?? void 0,
15706
+ NatGatewayId: properties["NatGatewayId"] ?? void 0,
15707
+ EgressOnlyInternetGatewayId: properties["EgressOnlyInternetGatewayId"] ?? void 0,
15708
+ InstanceId: properties["InstanceId"] ?? void 0,
15709
+ NetworkInterfaceId: properties["NetworkInterfaceId"] ?? void 0,
15710
+ TransitGatewayId: properties["TransitGatewayId"] ?? void 0,
15711
+ VpcEndpointId: properties["VpcEndpointId"] ?? void 0,
15712
+ VpcPeeringConnectionId: properties["VpcPeeringConnectionId"] ?? void 0
15713
+ };
15714
+ }
15715
+ function networkAclEntryRuleParams(properties, preferLegacyIcmp = false) {
15716
+ const portRange = properties["PortRange"];
15717
+ const icmpTypeCode = preferLegacyIcmp ? properties["IcmpTypeCode"] : properties["Icmp"] ?? properties["IcmpTypeCode"];
15718
+ return {
15719
+ Protocol: String(properties["Protocol"]),
15720
+ RuleAction: properties["RuleAction"],
15721
+ CidrBlock: properties["CidrBlock"],
15722
+ Ipv6CidrBlock: properties["Ipv6CidrBlock"],
15723
+ PortRange: portRange ? {
15724
+ From: portRange["From"],
15725
+ To: portRange["To"]
15726
+ } : void 0,
15727
+ IcmpTypeCode: icmpTypeCode ? {
15728
+ Code: icmpTypeCode["Code"],
15729
+ Type: icmpTypeCode["Type"]
15730
+ } : void 0
15731
+ };
15732
+ }
15700
15733
  function routeMultipleDestinationsMessage(logicalId, declared) {
15701
15734
  return `Route ${logicalId} declares more than one destination (${declared.join(", ")}). CloudFormation and EC2 accept exactly one of DestinationCidrBlock/DestinationIpv6CidrBlock/DestinationPrefixListId; remove the extra keys from the template.`;
15702
15735
  }
@@ -15927,6 +15960,7 @@ var EC2Provider = class {
15927
15960
  ])],
15928
15961
  ["AWS::EC2::SubnetNetworkAclAssociation", /* @__PURE__ */ new Set(["SubnetId", "NetworkAclId"])]
15929
15962
  ]);
15963
+ removalDefaults = /* @__PURE__ */ new Map([["AWS::EC2::VPC", /* @__PURE__ */ new Map([["EnableDnsHostnames", false], ["EnableDnsSupport", true]])]]);
15930
15964
  unhandledByDesign = /* @__PURE__ */ new Map([
15931
15965
  ["AWS::EC2::Instance", /* @__PURE__ */ new Map([["ElasticGpuSpecifications", "AWS Elastic GPU end-of-life (announced 2023-11); no replacement API"], ["ElasticInferenceAccelerators", "AWS Elastic Inference end-of-life 2024-04; use AWS Inferentia / Trainium accelerator instance families instead"]])],
15932
15966
  ["AWS::EC2::SecurityGroupIngress", /* @__PURE__ */ new Map([["GroupName", "EC2-Classic-only — use GroupId for VPC security groups (EC2-Classic retired 2022-08-15)"], ["SourceSecurityGroupName", "EC2-Classic-only — use SourceSecurityGroupId for VPC peer security groups (EC2-Classic retired 2022-08-15)"]])],
@@ -16080,6 +16114,7 @@ var EC2Provider = class {
16080
16114
  }
16081
16115
  }
16082
16116
  async update(logicalId, physicalId, resourceType, properties, previousProperties, context) {
16117
+ properties = withRemovalDefaults(this.removalDefaults, resourceType, properties, previousProperties, context);
16083
16118
  try {
16084
16119
  return await this.applyUpdate(logicalId, physicalId, resourceType, properties, previousProperties, context);
16085
16120
  } catch (error) {
@@ -16102,8 +16137,8 @@ var EC2Provider = class {
16102
16137
  case "AWS::EC2::SecurityGroup": return this.updateSecurityGroup(logicalId, physicalId, resourceType, properties, previousProperties);
16103
16138
  case "AWS::EC2::SecurityGroupIngress": return this.updateSecurityGroupIngress(logicalId, physicalId, resourceType, properties, previousProperties, context?.maskSecrets, context?.replayingState === true, context?.recordedAttributes);
16104
16139
  case "AWS::EC2::Instance": return this.updateInstance(logicalId, physicalId, resourceType, properties, previousProperties);
16140
+ case "AWS::EC2::NetworkAclEntry": return this.updateNetworkAclEntry(logicalId, physicalId, resourceType, properties, previousProperties, context);
16105
16141
  case "AWS::EC2::NetworkAcl":
16106
- case "AWS::EC2::NetworkAclEntry":
16107
16142
  case "AWS::EC2::SubnetNetworkAclAssociation": throw new ResourceUpdateNotSupportedError(resourceType, logicalId, "AWS provides no in-place Update API for this EC2 sub-resource type; every property change requires Delete + Create. Re-deploy with cdkd deploy --replace, or destroy + redeploy.");
16108
16143
  default: throw new ProvisioningError(`Unsupported resource type: ${resourceType}`, resourceType, logicalId, physicalId);
16109
16144
  }
@@ -17048,17 +17083,7 @@ var EC2Provider = class {
17048
17083
  await this.ec2Client.send(new CreateRouteCommand({
17049
17084
  RouteTableId: routeTableId,
17050
17085
  ...destinationCidrBlock ? { DestinationCidrBlock: destinationCidrBlock } : destinationIpv6CidrBlock ? { DestinationIpv6CidrBlock: destinationIpv6CidrBlock } : { DestinationPrefixListId: destinationPrefixListId },
17051
- CarrierGatewayId: properties["CarrierGatewayId"] ?? void 0,
17052
- CoreNetworkArn: properties["CoreNetworkArn"] ?? void 0,
17053
- GatewayId: properties["GatewayId"] ?? void 0,
17054
- LocalGatewayId: properties["LocalGatewayId"] ?? void 0,
17055
- NatGatewayId: properties["NatGatewayId"] ?? void 0,
17056
- EgressOnlyInternetGatewayId: properties["EgressOnlyInternetGatewayId"] ?? void 0,
17057
- InstanceId: properties["InstanceId"] ?? void 0,
17058
- NetworkInterfaceId: properties["NetworkInterfaceId"] ?? void 0,
17059
- TransitGatewayId: properties["TransitGatewayId"] ?? void 0,
17060
- VpcEndpointId: properties["VpcEndpointId"] ?? void 0,
17061
- VpcPeeringConnectionId: properties["VpcPeeringConnectionId"] ?? void 0
17086
+ ...routeTargetParams(properties)
17062
17087
  }));
17063
17088
  this.logger.debug(`Successfully created Route ${logicalId}: ${physicalId}`);
17064
17089
  return {
@@ -17082,6 +17107,33 @@ var EC2Provider = class {
17082
17107
  const { declared } = narrowRouteDestinations(properties);
17083
17108
  if (declared.length > 1) throw new ProvisioningError(`${routeMultipleDestinationsMessage(logicalId, declared)} The route was not changed.`, resourceType, logicalId, physicalId);
17084
17109
  }
17110
+ const { declared: declaredDestinations, narrowed: narrowedProperties } = narrowRouteDestinations(properties);
17111
+ const usedDestinationKey = declaredDestinations[0];
17112
+ const routeTableId = properties["RouteTableId"];
17113
+ const destination = usedDestinationKey === void 0 ? void 0 : properties[usedDestinationKey];
17114
+ if (usedDestinationKey !== void 0 && typeof routeTableId === "string" && typeof destination === "string" && `${routeTableId}|${destination}` === physicalId) {
17115
+ let effectiveProperties;
17116
+ if (declaredDestinations.length > 1) {
17117
+ effectiveProperties = narrowedProperties;
17118
+ this.logger.warn(safeMsg`${routeMultipleDestinationsMessage(logicalId, declaredDestinations)} Continuing with ${usedDestinationKey} and ignoring the rest.`);
17119
+ }
17120
+ try {
17121
+ await this.ec2Client.send(new ReplaceRouteCommand({
17122
+ RouteTableId: routeTableId,
17123
+ [usedDestinationKey]: destination,
17124
+ ...routeTargetParams(properties)
17125
+ }));
17126
+ this.logger.debug(safeMsg`Successfully replaced the target of Route ${logicalId}`);
17127
+ return {
17128
+ physicalId,
17129
+ wasReplaced: false,
17130
+ ...effectiveProperties && { effectiveProperties }
17131
+ };
17132
+ } catch (error) {
17133
+ const cause = error instanceof Error ? error : void 0;
17134
+ throw this.wrapCaughtError(error, (text) => new ProvisioningError(`Failed to update Route ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
17135
+ }
17136
+ }
17085
17137
  try {
17086
17138
  await this.deleteRoute(logicalId, physicalId, resourceType);
17087
17139
  const createResult = await this.createRoute(logicalId, resourceType, properties, (message) => this.logger.warn(message), maskSecrets);
@@ -18223,26 +18275,11 @@ var EC2Provider = class {
18223
18275
  ...context?.replayingState === true && { onRefusal: (message) => this.logger.warn(message) }
18224
18276
  });
18225
18277
  try {
18226
- const cidrBlock = properties["CidrBlock"];
18227
- const ipv6CidrBlock = properties["Ipv6CidrBlock"];
18228
- const portRange = properties["PortRange"];
18229
- const icmpTypeCode = properties["Icmp"] ?? properties["IcmpTypeCode"];
18230
18278
  await this.ec2Client.send(new CreateNetworkAclEntryCommand({
18231
18279
  NetworkAclId: networkAclId,
18232
18280
  RuleNumber: ruleNumber,
18233
- Protocol: String(protocol),
18234
- RuleAction: ruleAction,
18235
18281
  Egress: egress,
18236
- CidrBlock: cidrBlock,
18237
- Ipv6CidrBlock: ipv6CidrBlock,
18238
- PortRange: portRange ? {
18239
- From: portRange["From"],
18240
- To: portRange["To"]
18241
- } : void 0,
18242
- IcmpTypeCode: icmpTypeCode ? {
18243
- Code: icmpTypeCode["Code"],
18244
- Type: icmpTypeCode["Type"]
18245
- } : void 0
18282
+ ...networkAclEntryRuleParams(properties)
18246
18283
  }));
18247
18284
  this.logger.debug(`Successfully created NetworkAclEntry ${logicalId}: ${physicalId}`);
18248
18285
  return {
@@ -18285,6 +18322,42 @@ var EC2Provider = class {
18285
18322
  throw this.wrapCaughtError(error, (text) => new ProvisioningError(`Failed to delete NetworkAclEntry ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
18286
18323
  }
18287
18324
  }
18325
+ async updateNetworkAclEntry(logicalId, physicalId, resourceType, properties, previousProperties, context) {
18326
+ if (JSON.stringify(properties) === JSON.stringify(previousProperties)) return {
18327
+ physicalId,
18328
+ wasReplaced: false
18329
+ };
18330
+ const networkAclId = properties["NetworkAclId"];
18331
+ const ruleNumber = properties["RuleNumber"];
18332
+ const egress = properties["Egress"] ?? false;
18333
+ const parts = physicalId.split("|");
18334
+ if (parts.length !== 3) throw new ProvisioningError(compositeIdFormatMessage(EC2_NETWORK_ACL_ENTRY_ID_FORMAT, logicalId, physicalId), resourceType, logicalId, physicalId);
18335
+ if (typeof networkAclId !== "string" || ruleNumber === void 0 || parts[0] !== networkAclId || parts[1] !== String(ruleNumber) || parts[2] !== String(egress)) throw new ResourceUpdateNotSupportedError(resourceType, logicalId, "NetworkAclId, RuleNumber and Egress identify the entry and are createOnly; a change to any of them requires a new entry. Re-deploy with cdkd deploy --replace, or destroy + redeploy.");
18336
+ if (properties["Protocol"] == null || !properties["RuleAction"]) throw new ProvisioningError(`Protocol and RuleAction are required for NetworkAclEntry ${logicalId}`, resourceType, logicalId, physicalId);
18337
+ const ruleParams = networkAclEntryRuleParams(properties, properties["Icmp"] !== void 0 && properties["IcmpTypeCode"] !== void 0 && JSON.stringify(properties["Icmp"]) === JSON.stringify(previousProperties["Icmp"]) && JSON.stringify(properties["IcmpTypeCode"]) !== JSON.stringify(previousProperties["IcmpTypeCode"]));
18338
+ if (context?.desiredFromAwsReadback === true && ruleParams.CidrBlock !== void 0 && ruleParams.Ipv6CidrBlock !== void 0) {
18339
+ const v4Changed = properties["CidrBlock"] !== previousProperties["CidrBlock"];
18340
+ const v6Changed = properties["Ipv6CidrBlock"] !== previousProperties["Ipv6CidrBlock"];
18341
+ if (v4Changed && !v6Changed) ruleParams.Ipv6CidrBlock = void 0;
18342
+ else if (v6Changed && !v4Changed) ruleParams.CidrBlock = void 0;
18343
+ }
18344
+ try {
18345
+ await this.ec2Client.send(new ReplaceNetworkAclEntryCommand({
18346
+ NetworkAclId: networkAclId,
18347
+ RuleNumber: parseInt(parts[1], 10),
18348
+ Egress: parts[2] === "true",
18349
+ ...ruleParams
18350
+ }));
18351
+ this.logger.debug(safeMsg`Successfully replaced NetworkAclEntry ${logicalId} in place`);
18352
+ return {
18353
+ physicalId,
18354
+ wasReplaced: false
18355
+ };
18356
+ } catch (error) {
18357
+ const cause = error instanceof Error ? error : void 0;
18358
+ throw this.wrapCaughtError(error, (text) => new ProvisioningError(`Failed to update NetworkAclEntry ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
18359
+ }
18360
+ }
18288
18361
  async createSubnetNetworkAclAssociation(logicalId, resourceType, properties) {
18289
18362
  this.logger.debug(`Creating SubnetNetworkAclAssociation ${logicalId}`);
18290
18363
  const networkAclId = properties["NetworkAclId"];
@@ -32511,7 +32584,7 @@ var AppSyncProvider = class {
32511
32584
  async create(logicalId, resourceType, properties, context) {
32512
32585
  switch (resourceType) {
32513
32586
  case "AWS::AppSync::GraphQLApi": return this.createGraphQLApi(logicalId, resourceType, properties, context);
32514
- case "AWS::AppSync::GraphQLSchema": return this.createGraphQLSchema(logicalId, resourceType, properties);
32587
+ case "AWS::AppSync::GraphQLSchema": return this.createGraphQLSchema(logicalId, resourceType, properties, context);
32515
32588
  case "AWS::AppSync::DataSource": return this.createDataSource(logicalId, resourceType, properties, context);
32516
32589
  case "AWS::AppSync::Resolver": return this.createResolver(logicalId, resourceType, properties, context);
32517
32590
  case "AWS::AppSync::ApiKey": return this.createApiKey(logicalId, resourceType, properties, context);
@@ -32521,7 +32594,7 @@ var AppSyncProvider = class {
32521
32594
  async update(logicalId, physicalId, resourceType, properties, previousProperties, context) {
32522
32595
  switch (resourceType) {
32523
32596
  case "AWS::AppSync::GraphQLApi": return this.updateGraphQLApi(logicalId, physicalId, resourceType, properties, previousProperties, context);
32524
- case "AWS::AppSync::GraphQLSchema": return this.updateGraphQLSchema(logicalId, physicalId, resourceType, properties, previousProperties);
32597
+ case "AWS::AppSync::GraphQLSchema": return this.updateGraphQLSchema(logicalId, physicalId, resourceType, properties, previousProperties, maskerOrIdentity(context?.maskSecrets));
32525
32598
  case "AWS::AppSync::DataSource": return this.updateDataSource(logicalId, physicalId, resourceType, properties, previousProperties, maskerOrIdentity(context?.maskSecrets));
32526
32599
  case "AWS::AppSync::Resolver": return this.updateResolver(logicalId, physicalId, resourceType, properties, previousProperties, maskerOrIdentity(context?.maskSecrets));
32527
32600
  case "AWS::AppSync::ApiKey": return this.updateApiKey(logicalId, physicalId, resourceType, properties, previousProperties, maskerOrIdentity(context?.maskSecrets));
@@ -32625,14 +32698,14 @@ var AppSyncProvider = class {
32625
32698
  }
32626
32699
  }
32627
32700
  const envRecord = await this.applyEnvironmentVariables(physicalId, resourceType, logicalId, properties, previousProperties, false, maskerOrIdentity(context?.maskSecrets));
32628
- await this.applyTagDiff(physicalId, resourceType, logicalId, previousProperties["Tags"], properties["Tags"]);
32701
+ await this.applyTagDiff(physicalId, resourceType, logicalId, previousProperties["Tags"], properties["Tags"], maskerOrIdentity(context?.maskSecrets));
32629
32702
  return {
32630
32703
  physicalId,
32631
32704
  wasReplaced: false,
32632
32705
  ...envRecord && { effectiveProperties: this.withEnvironmentVariablesRecord(properties, envRecord) }
32633
32706
  };
32634
32707
  }
32635
- async updateGraphQLSchema(logicalId, physicalId, resourceType, properties, previousProperties) {
32708
+ async updateGraphQLSchema(logicalId, physicalId, resourceType, properties, previousProperties, mask = maskerOrIdentity(void 0)) {
32636
32709
  const newDef = properties["Definition"];
32637
32710
  const oldDef = previousProperties["Definition"];
32638
32711
  const newLoc = properties["DefinitionS3Location"];
@@ -32650,7 +32723,7 @@ var AppSyncProvider = class {
32650
32723
  physicalId,
32651
32724
  wasReplaced: false
32652
32725
  };
32653
- definition = await this.fetchS3LocationBody(newLoc, resourceType, logicalId, "DefinitionS3Location");
32726
+ definition = await this.fetchS3LocationBody(newLoc, resourceType, logicalId, "DefinitionS3Location", mask);
32654
32727
  } else return {
32655
32728
  physicalId,
32656
32729
  wasReplaced: false
@@ -32662,7 +32735,7 @@ var AppSyncProvider = class {
32662
32735
  definition: Buffer.from(definition, "utf-8")
32663
32736
  }));
32664
32737
  } catch (error) {
32665
- throw this.wrapUpdateError(error, resourceType, logicalId, physicalId, "GraphqlSchema");
32738
+ throw this.wrapUpdateError(error, resourceType, logicalId, physicalId, "GraphqlSchema", mask);
32666
32739
  }
32667
32740
  return {
32668
32741
  physicalId,
@@ -32756,7 +32829,7 @@ var AppSyncProvider = class {
32756
32829
  typeName,
32757
32830
  fieldName
32758
32831
  };
32759
- await this.applyResolverConfig(input, resourceType, logicalId, properties, previousProperties, true);
32832
+ await this.applyResolverConfig(input, resourceType, logicalId, properties, previousProperties, true, mask);
32760
32833
  try {
32761
32834
  await this.getClient().send(new UpdateResolverCommand(input));
32762
32835
  } catch (error) {
@@ -32792,7 +32865,7 @@ var AppSyncProvider = class {
32792
32865
  }
32793
32866
  return this.childUpdateResult(resourceType, physicalId, mask);
32794
32867
  }
32795
- async applyTagDiff(apiId, resourceType, logicalId, oldTagsRaw, newTagsRaw) {
32868
+ async applyTagDiff(apiId, resourceType, logicalId, oldTagsRaw, newTagsRaw, mask = maskerOrIdentity(void 0)) {
32796
32869
  const plan = planTagDiff(oldTagsRaw, newTagsRaw);
32797
32870
  const tagWarning = tagPlanWarning(plan, resourceType, logicalId);
32798
32871
  if (tagWarning !== void 0) this.logger.warn(tagWarning);
@@ -32802,7 +32875,7 @@ var AppSyncProvider = class {
32802
32875
  try {
32803
32876
  arn = (await this.getClient().send(new GetGraphqlApiCommand({ apiId }))).graphqlApi?.arn;
32804
32877
  } catch (error) {
32805
- throw this.wrapUpdateError(error, resourceType, logicalId, apiId, "GraphqlApi");
32878
+ throw this.wrapUpdateError(error, resourceType, logicalId, apiId, "GraphqlApi", mask);
32806
32879
  }
32807
32880
  if (!arn) throw new ProvisioningError(`Could not resolve ARN for AppSync GraphqlApi ${apiId} to apply tags diff`, resourceType, logicalId, apiId);
32808
32881
  this.arnCache.set(apiId, arn);
@@ -32815,7 +32888,7 @@ var AppSyncProvider = class {
32815
32888
  tagKeys: tagKeysToRemove
32816
32889
  }));
32817
32890
  } catch (error) {
32818
- throw this.wrapUpdateError(error, resourceType, logicalId, apiId, "GraphqlApi (untag)");
32891
+ throw this.wrapUpdateError(error, resourceType, logicalId, apiId, "GraphqlApi (untag)", mask);
32819
32892
  }
32820
32893
  if (Object.keys(tagsToAdd).length > 0) try {
32821
32894
  await this.getClient().send(new TagResourceCommand$17({
@@ -32823,12 +32896,24 @@ var AppSyncProvider = class {
32823
32896
  tags: tagsToAdd
32824
32897
  }));
32825
32898
  } catch (error) {
32826
- throw this.wrapUpdateError(error, resourceType, logicalId, apiId, "GraphqlApi (tag)");
32899
+ throw this.wrapUpdateError(error, resourceType, logicalId, apiId, "GraphqlApi (tag)", mask);
32827
32900
  }
32828
32901
  }
32829
32902
  wrapUpdateError(error, resourceType, logicalId, physicalId, subType, mask = maskerOrIdentity(void 0)) {
32830
32903
  const cause = error instanceof Error ? error : void 0;
32831
- return wrapMaskedAwsError(mask, error, (text) => new ProvisioningError(`Failed to update AppSync ${subType} ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
32904
+ const build = (text) => new ProvisioningError(`Failed to update AppSync ${subType} ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause);
32905
+ const failure = describeAwsFailure(error);
32906
+ if (error instanceof Error && failure.redacted) return this.withheldAwsFailure(mask, failure.detail, failure.summary, build);
32907
+ return wrapMaskedAwsError(mask, error, build);
32908
+ }
32909
+ wrapCaughtError(mask, error, build) {
32910
+ const failure = describeAwsFailure(error);
32911
+ if (!(error instanceof Error) || !failure.redacted) return build(failure.detail);
32912
+ return this.withheldAwsFailure(mask, failure.detail, failure.summary, build);
32913
+ }
32914
+ withheldAwsFailure(mask, detail, summary, build) {
32915
+ this.logger.debug(mask(build(mask(detail)).message));
32916
+ return markRedactedCause(build(`${mask(summary)}${relayedNameCollision(detail)}`));
32832
32917
  }
32833
32918
  async delete(logicalId, physicalId, resourceType, _properties, context) {
32834
32919
  switch (resourceType) {
@@ -33057,7 +33142,7 @@ var AppSyncProvider = class {
33057
33142
  environmentVariables
33058
33143
  }));
33059
33144
  } catch (error) {
33060
- throw this.wrapUpdateError(error, resourceType, logicalId, apiId, isUpdate ? "GraphqlApi (env vars)" : "GraphqlApi (env vars, post-create)");
33145
+ throw this.wrapUpdateError(error, resourceType, logicalId, apiId, isUpdate ? "GraphqlApi (env vars)" : "GraphqlApi (env vars, post-create)", mask);
33061
33146
  }
33062
33147
  return narrowed;
33063
33148
  }
@@ -33099,7 +33184,7 @@ var AppSyncProvider = class {
33099
33184
  key: match[2]
33100
33185
  };
33101
33186
  }
33102
- async fetchS3LocationBody(location, resourceType, logicalId, propertyPath) {
33187
+ async fetchS3LocationBody(location, resourceType, logicalId, propertyPath, mask = maskerOrIdentity(void 0)) {
33103
33188
  const { bucket, key } = this.parseS3LocationUrl(location, resourceType, logicalId, propertyPath);
33104
33189
  this.logger.debug(`Fetching ${propertyPath} for ${logicalId} from s3://${bucket}/${key}`);
33105
33190
  let body;
@@ -33112,19 +33197,20 @@ var AppSyncProvider = class {
33112
33197
  body = await resp.Body.transformToString();
33113
33198
  } catch (error) {
33114
33199
  if (error instanceof ProvisioningError) throw error;
33115
- throw new ProvisioningError(`Failed to fetch ${propertyPath} s3://${bucket}/${key} for ${logicalId}: ${describeAwsFailure(error).detail}`, resourceType, logicalId, void 0, error instanceof Error ? error : void 0);
33200
+ const cause = error instanceof Error ? error : void 0;
33201
+ throw this.wrapCaughtError(mask, error, (text) => new ProvisioningError(`Failed to fetch ${propertyPath} s3://${bucket}/${key} for ${logicalId}: ${text}`, resourceType, logicalId, void 0, cause));
33116
33202
  }
33117
33203
  if (body.length === 0) throw new ProvisioningError(`${propertyPath} object s3://${bucket}/${key} returned an empty body`, resourceType, logicalId);
33118
33204
  return body;
33119
33205
  }
33120
- async resolveInlineOrS3Template(inline, s3Location, inlineKey, s3Key, resourceType, logicalId) {
33206
+ async resolveInlineOrS3Template(inline, s3Location, inlineKey, s3Key, resourceType, logicalId, mask = maskerOrIdentity(void 0)) {
33121
33207
  if (inline !== void 0) {
33122
33208
  if (s3Location !== void 0) this.logger.warn(`${resourceType} ${logicalId}: both ${inlineKey} and ${s3Key} are set — using the inline ${inlineKey} and ignoring ${s3Key} (CFn treats them as alternatives)`);
33123
33209
  return inline;
33124
33210
  }
33125
- if (s3Location !== void 0) return this.fetchS3LocationBody(s3Location, resourceType, logicalId, s3Key);
33211
+ if (s3Location !== void 0) return this.fetchS3LocationBody(s3Location, resourceType, logicalId, s3Key, mask);
33126
33212
  }
33127
- async applyResolverConfig(input, resourceType, logicalId, properties, previousProperties, forUpdate = false) {
33213
+ async applyResolverConfig(input, resourceType, logicalId, properties, previousProperties, forUpdate = false, mask = maskerOrIdentity(void 0)) {
33128
33214
  const effectiveKind = properties["Kind"] ?? previousProperties?.["Kind"] ?? "UNIT";
33129
33215
  if ((!forUpdate || effectiveKind === "UNIT") && properties["DataSourceName"] !== void 0) input.dataSourceName = properties["DataSourceName"];
33130
33216
  if (properties["Kind"] !== void 0) input.kind = properties["Kind"];
@@ -33136,11 +33222,11 @@ var AppSyncProvider = class {
33136
33222
  runtimeVersion: runtime["RuntimeVersion"]
33137
33223
  };
33138
33224
  }
33139
- const requestTemplate = await this.resolveInlineOrS3Template(properties["RequestMappingTemplate"], properties["RequestMappingTemplateS3Location"], "RequestMappingTemplate", "RequestMappingTemplateS3Location", resourceType, logicalId);
33225
+ const requestTemplate = await this.resolveInlineOrS3Template(properties["RequestMappingTemplate"], properties["RequestMappingTemplateS3Location"], "RequestMappingTemplate", "RequestMappingTemplateS3Location", resourceType, logicalId, mask);
33140
33226
  if (requestTemplate !== void 0) input.requestMappingTemplate = requestTemplate;
33141
- const responseTemplate = await this.resolveInlineOrS3Template(properties["ResponseMappingTemplate"], properties["ResponseMappingTemplateS3Location"], "ResponseMappingTemplate", "ResponseMappingTemplateS3Location", resourceType, logicalId);
33227
+ const responseTemplate = await this.resolveInlineOrS3Template(properties["ResponseMappingTemplate"], properties["ResponseMappingTemplateS3Location"], "ResponseMappingTemplate", "ResponseMappingTemplateS3Location", resourceType, logicalId, mask);
33142
33228
  if (responseTemplate !== void 0) input.responseMappingTemplate = responseTemplate;
33143
- const code = await this.resolveInlineOrS3Template(properties["Code"], properties["CodeS3Location"], "Code", "CodeS3Location", resourceType, logicalId);
33229
+ const code = await this.resolveInlineOrS3Template(properties["Code"], properties["CodeS3Location"], "Code", "CodeS3Location", resourceType, logicalId, mask);
33144
33230
  if (code !== void 0) input.code = code;
33145
33231
  const caching = this.toSdkCachingConfig(properties["CachingConfig"], logicalId);
33146
33232
  if (caching) input.cachingConfig = caching;
@@ -33287,7 +33373,7 @@ var AppSyncProvider = class {
33287
33373
  }
33288
33374
  }
33289
33375
  const cause = error instanceof Error ? error : void 0;
33290
- const thrown = new ProvisioningError(`Failed to create GraphQL API ${logicalId}: ${describeAwsFailure(error).detail}`, resourceType, logicalId, void 0, cause);
33376
+ const thrown = this.wrapCaughtError(maskerOrIdentity(context?.maskSecrets), error, (text) => new ProvisioningError(`Failed to create GraphQL API ${logicalId}: ${text}`, resourceType, logicalId, void 0, cause));
33291
33377
  if (apiLeftBehind && createdApiId) {
33292
33378
  markCreatedBeforeFailure(thrown, logicalId, resourceType, createdApiId);
33293
33379
  markNonRetryable(thrown);
@@ -33356,10 +33442,10 @@ var AppSyncProvider = class {
33356
33442
  return;
33357
33443
  }
33358
33444
  const cause = error instanceof Error ? error : void 0;
33359
- throw new ProvisioningError(`Failed to delete GraphQL API ${logicalId}: ${describeAwsFailure(error).detail}`, resourceType, logicalId, physicalId, cause);
33445
+ throw this.wrapCaughtError(maskerOrIdentity(context?.maskSecrets), error, (text) => new ProvisioningError(`Failed to delete GraphQL API ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
33360
33446
  }
33361
33447
  }
33362
- async createGraphQLSchema(logicalId, resourceType, properties) {
33448
+ async createGraphQLSchema(logicalId, resourceType, properties, context) {
33363
33449
  this.logger.debug(`Creating GraphQL Schema ${logicalId}`);
33364
33450
  const apiId = properties["ApiId"];
33365
33451
  if (!apiId) throw new ProvisioningError(`ApiId is required for GraphQLSchema ${logicalId}`, resourceType, logicalId);
@@ -33373,7 +33459,7 @@ var AppSyncProvider = class {
33373
33459
  definition: new TextEncoder().encode(definition)
33374
33460
  }));
33375
33461
  } else if (definitionS3Location !== void 0) {
33376
- const body = await this.fetchS3LocationBody(definitionS3Location, resourceType, logicalId, "DefinitionS3Location");
33462
+ const body = await this.fetchS3LocationBody(definitionS3Location, resourceType, logicalId, "DefinitionS3Location", maskerOrIdentity(context?.maskSecrets));
33377
33463
  await this.getClient().send(new StartSchemaCreationCommand({
33378
33464
  apiId,
33379
33465
  definition: new TextEncoder().encode(body)
@@ -33386,7 +33472,7 @@ var AppSyncProvider = class {
33386
33472
  };
33387
33473
  } catch (error) {
33388
33474
  const cause = error instanceof Error ? error : void 0;
33389
- throw new ProvisioningError(`Failed to create GraphQL Schema ${logicalId}: ${describeAwsFailure(error).detail}`, resourceType, logicalId, void 0, cause);
33475
+ throw this.wrapCaughtError(maskerOrIdentity(context?.maskSecrets), error, (text) => new ProvisioningError(`Failed to create GraphQL Schema ${logicalId}: ${text}`, resourceType, logicalId, void 0, cause));
33390
33476
  }
33391
33477
  }
33392
33478
  async createDataSource(logicalId, resourceType, properties, context) {
@@ -33417,7 +33503,7 @@ var AppSyncProvider = class {
33417
33503
  this.logger.debug(`Successfully created DataSource ${logicalId}: ${physicalId}`);
33418
33504
  } catch (error) {
33419
33505
  const cause = error instanceof Error ? error : void 0;
33420
- throw new ProvisioningError(`Failed to create DataSource ${logicalId}: ${describeAwsFailure(error).detail}`, resourceType, logicalId, void 0, cause);
33506
+ throw this.wrapCaughtError(maskerOrIdentity(context?.maskSecrets), error, (text) => new ProvisioningError(`Failed to create DataSource ${logicalId}: ${text}`, resourceType, logicalId, void 0, cause));
33421
33507
  }
33422
33508
  const dataSourceArn = reportedArn ?? await this.buildAppSyncArnOrWarn(`apis/${apiId}/datasources/${name}`, logicalId, physicalId);
33423
33509
  return {
@@ -33449,7 +33535,7 @@ var AppSyncProvider = class {
33449
33535
  return;
33450
33536
  }
33451
33537
  const cause = error instanceof Error ? error : void 0;
33452
- throw new ProvisioningError(`Failed to delete DataSource ${logicalId}: ${describeAwsFailure(error).detail}`, resourceType, logicalId, physicalId, cause);
33538
+ throw this.wrapCaughtError(maskerOrIdentity(context?.maskSecrets), error, (text) => new ProvisioningError(`Failed to delete DataSource ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
33453
33539
  }
33454
33540
  }
33455
33541
  async createResolver(logicalId, resourceType, properties, context) {
@@ -33482,12 +33568,12 @@ var AppSyncProvider = class {
33482
33568
  typeName,
33483
33569
  fieldName
33484
33570
  };
33485
- await this.applyResolverConfig(input, resourceType, logicalId, properties);
33571
+ await this.applyResolverConfig(input, resourceType, logicalId, properties, void 0, false, maskerOrIdentity(context?.maskSecrets));
33486
33572
  reportedArn = (await this.getClient().send(new CreateResolverCommand(input))).resolver?.resolverArn;
33487
33573
  this.logger.debug(`Successfully created Resolver ${logicalId}: ${physicalId}`);
33488
33574
  } catch (error) {
33489
33575
  const cause = error instanceof Error ? error : void 0;
33490
- throw new ProvisioningError(`Failed to create Resolver ${logicalId}: ${describeAwsFailure(error).detail}`, resourceType, logicalId, void 0, cause);
33576
+ throw this.wrapCaughtError(maskerOrIdentity(context?.maskSecrets), error, (text) => new ProvisioningError(`Failed to create Resolver ${logicalId}: ${text}`, resourceType, logicalId, void 0, cause));
33491
33577
  }
33492
33578
  const resolverArn = reportedArn ?? await this.buildAppSyncArnOrWarn(`apis/${apiId}/types/${typeName}/resolvers/${fieldName}`, logicalId, physicalId);
33493
33579
  return {
@@ -33518,7 +33604,7 @@ var AppSyncProvider = class {
33518
33604
  return;
33519
33605
  }
33520
33606
  const cause = error instanceof Error ? error : void 0;
33521
- throw new ProvisioningError(`Failed to delete Resolver ${logicalId}: ${describeAwsFailure(error).detail}`, resourceType, logicalId, physicalId, cause);
33607
+ throw this.wrapCaughtError(maskerOrIdentity(context?.maskSecrets), error, (text) => new ProvisioningError(`Failed to delete Resolver ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
33522
33608
  }
33523
33609
  }
33524
33610
  async createApiKey(logicalId, resourceType, properties, context) {
@@ -33547,7 +33633,7 @@ var AppSyncProvider = class {
33547
33633
  this.logger.debug(`Successfully created ApiKey ${logicalId}: ${apiKeyId}`);
33548
33634
  } catch (error) {
33549
33635
  const cause = error instanceof Error ? error : void 0;
33550
- throw new ProvisioningError(`Failed to create ApiKey ${logicalId}: ${describeAwsFailure(error).detail}`, resourceType, logicalId, void 0, cause);
33636
+ throw this.wrapCaughtError(maskerOrIdentity(context?.maskSecrets), error, (text) => new ProvisioningError(`Failed to create ApiKey ${logicalId}: ${text}`, resourceType, logicalId, void 0, cause));
33551
33637
  }
33552
33638
  const physicalId = packCompositeId(resourceType, logicalId, [{
33553
33639
  name: "apiId",
@@ -33614,7 +33700,7 @@ var AppSyncProvider = class {
33614
33700
  return;
33615
33701
  }
33616
33702
  const cause = error instanceof Error ? error : void 0;
33617
- throw new ProvisioningError(`Failed to delete ApiKey ${logicalId}: ${describeAwsFailure(error).detail}`, resourceType, logicalId, physicalId, cause);
33703
+ throw this.wrapCaughtError(maskerOrIdentity(context?.maskSecrets), error, (text) => new ProvisioningError(`Failed to delete ApiKey ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
33618
33704
  }
33619
33705
  }
33620
33706
  isNotFoundError(error) {
@@ -46870,4 +46956,4 @@ var ACMCertificateProvider = class {
46870
46956
 
46871
46957
  //#endregion
46872
46958
  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 };
46873
- //# sourceMappingURL=provider-classes-D41TJi4B.js.map
46959
+ //# sourceMappingURL=provider-classes-B9XBsEl1.js.map