@go-to-k/cdkd 0.299.6 → 0.299.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{asg-provider-SsXASjNc.js → asg-provider-ebjf5E8o.js} +2 -2
- package/dist/{asg-provider-SsXASjNc.js.map → asg-provider-ebjf5E8o.js.map} +1 -1
- package/dist/cli.js +2 -2
- package/dist/{deploy-engine-DZhdwU1d.js → deploy-engine-BU3iY59A.js} +142 -18
- package/dist/deploy-engine-BU3iY59A.js.map +1 -0
- package/dist/{iam-role-provider-DIo2_z0s.js → iam-role-provider-C8O3q2ua.js} +2 -2
- package/dist/{iam-role-provider-DIo2_z0s.js.map → iam-role-provider-C8O3q2ua.js.map} +1 -1
- package/dist/index.js +2 -2
- package/dist/{neptune-provider-eZd5MtAD.js → neptune-provider-CuJF3t-Q.js} +2 -2
- package/dist/{neptune-provider-eZd5MtAD.js.map → neptune-provider-CuJF3t-Q.js.map} +1 -1
- package/dist/{program-CvyqGZ2h.js → program-C87Q8YFK.js} +4 -4
- package/dist/{program-CvyqGZ2h.js.map → program-C87Q8YFK.js.map} +1 -1
- package/dist/{provider-classes-Dnof5qun.js → provider-classes-DmohfhIq.js} +102 -19
- package/dist/provider-classes-DmohfhIq.js.map +1 -0
- package/dist/{rds-provider--_cLSeij.js → rds-provider-Br3hPyHP.js} +2 -2
- package/dist/{rds-provider--_cLSeij.js.map → rds-provider-Br3hPyHP.js.map} +1 -1
- package/dist/{version--k430Kj8.js → version-BtTEjOpj.js} +2 -2
- package/dist/{version--k430Kj8.js.map → version-BtTEjOpj.js.map} +1 -1
- package/package.json +1 -1
- package/dist/deploy-engine-DZhdwU1d.js.map +0 -1
- package/dist/provider-classes-Dnof5qun.js.map +0 -1
|
@@ -2,12 +2,12 @@ import { r as getAwsClients } from "./aws-clients-Bj7qH5Ph.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 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-dAY3-gXJ.js";
|
|
4
4
|
import { s as ambientRegion } from "./aws-client-defaults-DBXBcg0J.js";
|
|
5
|
-
import { $ as S3_AUTO_DELETE_OBJECTS_TAG, Ao as sameLambdaFunctionAddress, At as withNestedStackContext, Br as isTerminationProtectionPropagationError, Bt as awaitInFlightSibling, C as withApiLimit, Ci as getAccountInfo, Co as requireConfigString, Do as withRetry, Fr as withIndeterminateGuard, G as deleteBudgetKey, H as DYNAMODB_DELETE_MIN_RESOURCE_TIMEOUT_MS, Ho as passedNoEchoParametersOf, Hr as reDisableInstanceApiTermination, Ht as getStackRecords, Ii as passedParameterClassesOf, Ir as isWaitAbandonedError, J as DELETE_INDEX_WAIT_PROCEED_NOTE, K as resolveDynamoDbDeleteBudgetClock, Lr as markWaitAbandoned, Ml as displayAssemblyPath, Ni as parseWebACLArn, Nl as renderAssemblyPathEscape, Oo as canonicalLambdaFunctionName, Or as slowCcOperationTimeoutMs, Pl as resolveAssemblyPath, Pr as deleteSkipReason, Q as ECR_AUTO_DELETE_IMAGES_TAG, Qa as findSilentDropProperties, Ra as refuseMalformedResourcesForDestroy, S as lookupEachName, So as requireConfigObject, Sr as getCurrentResourceSecrets, Ss as recordAttributeIdCopy, St as getNestedRevertRun, Ts as carriesSecretMask, Tt as revertNestedChildFromJournal, U as beginDeleteWait, Ui as accountArgs, Ur as reEnableInstanceApiTermination, V as DynamoDBGlobalTableProvider, Vr as observeThenDisableInstanceApiTermination, W as compensateRemovedDeletionProtection, X as deleteTableWithIndexBusyRetry, Xa as withheldAccountClause, Y as INDEX_SETTLE_POLL_INTERVAL_MS, Yo as hasMaskableValues, Z as waitForIndexesSettled, _l as decodeListingKey, _o as configIntegerRefusal, ar as DBPROXY_TAGS_WHAT, b as chunks, bl as canonicalizeRegion, bo as replayWarn, bs as recoverMaskedOutput, c as isAbsoluteAssetPath, ci as outputReferenceProvenanceOf, cn as redactedDeleteAddressFields, cr as readTagList, cs as snapshotPassProvenance, di as s3BucketArn, do as isWarmThroughputDecrease, dr as tagPlanWarning, eo as withoutSilentDropProperties, er as earliestDefined, et as hasCdkAutoDeleteTag, fi as s3BucketDomainName, fo as toCfnInteger, fr as definedAttributes, fs as withoutPhysicalNameCopies, go as configBooleanRefusal, hc as rewriteTemplateAssetReferences, hi as s3BucketWebsiteUrl, ho as coerceCfnInteger, in as getCurrentProducerRegions, ir as acquireIdempotencyToken, jl as describeFileReadFailure, ko as lambdaFunctionNameForMask, kr as unchangedBehindSecretReference, kt as getCurrentNestedStackContext, l as listNestedTemplateRows, ln as redactedDeleteAddressSkip, lo as WARM_THROUGHPUT_MEMBERS, lr as refuseMalformedDesiredTags, ls as redactSecretsForState, mi as s3BucketRegionalDomainName, mo as coerceCfnBoolean, ms as dynamicReferenceTokens, nr as reserveStackCreateToken, nt as getPriorAttempts, oi as isSettledInstanceState, on as REDACTED_DELETE_ADDRESS_SKIP_REASON, or as DBPROXY_TAG_OPTIONS, os as markSameGenerationBag, pi as s3BucketDualStackDomainName, po as toFiniteNumber, pr as stringifyIfAssigned, q as resolveDynamoDbDeleteBudgetMs, rt as markRefusedBeforeApplying, s as findNestedTemplateTreeDefect, sn as isRedactedRecordedValue, sr as planTagDiff, ss as recordReferenceProvenanceEntry, t as DeployEngine, tt as isTruthyCfnBoolean, u as renderNestedTemplateTreeDefect, uc as stringifyValue, uo as coerceWarmThroughput$1, ur as tagMapAsList, va as refuseMalformedNestedChildOutputs, vo as configStringRefusal, x as isAccessDeniedError, xl as derivePartitionAndUrlSuffix, xo as requireConfigArray, xs as physicalNameCopiesOf, yo as readConfigString, zr as ec2InstanceProtectionSite } from "./deploy-engine-
|
|
6
|
-
import { n as collectInlinePolicyNamesManagedBySiblings, r as IamCreateClientCache, t as IAMRoleProvider } from "./iam-role-provider-
|
|
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-
|
|
8
|
-
import { RDSProvider } from "./rds-provider
|
|
9
|
-
import { NeptuneProvider } from "./neptune-provider-
|
|
10
|
-
import { ASGProvider } from "./asg-provider-
|
|
5
|
+
import { $ as S3_AUTO_DELETE_OBJECTS_TAG, Ao as sameLambdaFunctionAddress, At as withNestedStackContext, Br as isTerminationProtectionPropagationError, Bt as awaitInFlightSibling, C as withApiLimit, Ci as getAccountInfo, Co as requireConfigString, Do as withRetry, Fr as withIndeterminateGuard, G as deleteBudgetKey, H as DYNAMODB_DELETE_MIN_RESOURCE_TIMEOUT_MS, Ho as passedNoEchoParametersOf, Hr as reDisableInstanceApiTermination, Ht as getStackRecords, Ii as passedParameterClassesOf, Ir as isWaitAbandonedError, J as DELETE_INDEX_WAIT_PROCEED_NOTE, K as resolveDynamoDbDeleteBudgetClock, Lr as markWaitAbandoned, Ml as displayAssemblyPath, Ni as parseWebACLArn, Nl as renderAssemblyPathEscape, Oo as canonicalLambdaFunctionName, Or as slowCcOperationTimeoutMs, Pl as resolveAssemblyPath, Pr as deleteSkipReason, Q as ECR_AUTO_DELETE_IMAGES_TAG, Qa as findSilentDropProperties, Ra as refuseMalformedResourcesForDestroy, S as lookupEachName, So as requireConfigObject, Sr as getCurrentResourceSecrets, Ss as recordAttributeIdCopy, St as getNestedRevertRun, Ts as carriesSecretMask, Tt as revertNestedChildFromJournal, U as beginDeleteWait, Ui as accountArgs, Ur as reEnableInstanceApiTermination, V as DynamoDBGlobalTableProvider, Vr as observeThenDisableInstanceApiTermination, W as compensateRemovedDeletionProtection, X as deleteTableWithIndexBusyRetry, Xa as withheldAccountClause, Y as INDEX_SETTLE_POLL_INTERVAL_MS, Yo as hasMaskableValues, Z as waitForIndexesSettled, _l as decodeListingKey, _o as configIntegerRefusal, ar as DBPROXY_TAGS_WHAT, b as chunks, bl as canonicalizeRegion, bo as replayWarn, bs as recoverMaskedOutput, c as isAbsoluteAssetPath, ci as outputReferenceProvenanceOf, cn as redactedDeleteAddressFields, cr as readTagList, cs as snapshotPassProvenance, di as s3BucketArn, do as isWarmThroughputDecrease, dr as tagPlanWarning, eo as withoutSilentDropProperties, er as earliestDefined, et as hasCdkAutoDeleteTag, fi as s3BucketDomainName, fo as toCfnInteger, fr as definedAttributes, fs as withoutPhysicalNameCopies, go as configBooleanRefusal, hc as rewriteTemplateAssetReferences, hi as s3BucketWebsiteUrl, ho as coerceCfnInteger, in as getCurrentProducerRegions, ir as acquireIdempotencyToken, jl as describeFileReadFailure, ko as lambdaFunctionNameForMask, kr as unchangedBehindSecretReference, kt as getCurrentNestedStackContext, l as listNestedTemplateRows, ln as redactedDeleteAddressSkip, lo as WARM_THROUGHPUT_MEMBERS, lr as refuseMalformedDesiredTags, ls as redactSecretsForState, mi as s3BucketRegionalDomainName, mo as coerceCfnBoolean, ms as dynamicReferenceTokens, nr as reserveStackCreateToken, nt as getPriorAttempts, oi as isSettledInstanceState, on as REDACTED_DELETE_ADDRESS_SKIP_REASON, or as DBPROXY_TAG_OPTIONS, os as markSameGenerationBag, pi as s3BucketDualStackDomainName, po as toFiniteNumber, pr as stringifyIfAssigned, q as resolveDynamoDbDeleteBudgetMs, rt as markRefusedBeforeApplying, s as findNestedTemplateTreeDefect, sn as isRedactedRecordedValue, sr as planTagDiff, ss as recordReferenceProvenanceEntry, t as DeployEngine, tt as isTruthyCfnBoolean, u as renderNestedTemplateTreeDefect, uc as stringifyValue, uo as coerceWarmThroughput$1, ur as tagMapAsList, va as refuseMalformedNestedChildOutputs, vo as configStringRefusal, x as isAccessDeniedError, xl as derivePartitionAndUrlSuffix, xo as requireConfigArray, xs as physicalNameCopiesOf, yo as readConfigString, zr as ec2InstanceProtectionSite } from "./deploy-engine-BU3iY59A.js";
|
|
6
|
+
import { n as collectInlinePolicyNamesManagedBySiblings, r as IamCreateClientCache, t as IAMRoleProvider } from "./iam-role-provider-C8O3q2ua.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-C87Q8YFK.js";
|
|
8
|
+
import { RDSProvider } from "./rds-provider-Br3hPyHP.js";
|
|
9
|
+
import { NeptuneProvider } from "./neptune-provider-CuJF3t-Q.js";
|
|
10
|
+
import { ASGProvider } from "./asg-provider-ebjf5E8o.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";
|
|
@@ -9470,7 +9470,8 @@ var LambdaLayerVersionProvider = class {
|
|
|
9470
9470
|
throw wrapMaskedAwsError(log.mask, error, (text) => new ProvisioningError(`Failed to create Lambda layer version ${logicalId}: ${text}`, resourceType, logicalId, void 0, cause));
|
|
9471
9471
|
}
|
|
9472
9472
|
}
|
|
9473
|
-
async update(logicalId,
|
|
9473
|
+
async update(logicalId, physicalId, resourceType, _properties, _previousProperties, context) {
|
|
9474
|
+
assertRegionMatch(context?.expectedRegion ? await this.lambdaClient.config.region() : void 0, context?.expectedRegion, resourceType, logicalId, physicalId, "pre-update");
|
|
9474
9475
|
return Promise.reject(new ResourceUpdateNotSupportedError(resourceType, logicalId, "AWS Lambda LayerVersion is immutable on AWS — there is no UpdateLayerVersion API; every change requires PublishLayerVersion (a new version with a new LayerVersionArn). cdkd normally classifies any LayerVersion property change as a replacement (DELETE + CREATE), so reaching this path is unexpected; re-run the deploy or change the resource definition to publish a new version."));
|
|
9475
9476
|
}
|
|
9476
9477
|
async delete(logicalId, physicalId, resourceType, _properties, context) {
|
|
@@ -12203,6 +12204,10 @@ function isTransientStreamReadFailure(err) {
|
|
|
12203
12204
|
|
|
12204
12205
|
//#endregion
|
|
12205
12206
|
//#region src/provisioning/providers/logs-loggroup-provider.ts
|
|
12207
|
+
const LOG_GROUP_TYPE = "AWS::Logs::LogGroup";
|
|
12208
|
+
function isLogGroupName(id) {
|
|
12209
|
+
return /^[A-Za-z0-9._/#-]{1,512}$/.test(id);
|
|
12210
|
+
}
|
|
12206
12211
|
function isAbsentRetention(raw, desiredFromAwsReadback) {
|
|
12207
12212
|
if (raw === void 0) return true;
|
|
12208
12213
|
if (typeof raw === "string" && raw.trim() === "") return true;
|
|
@@ -12557,13 +12562,56 @@ var LogsLogGroupProvider = class {
|
|
|
12557
12562
|
if (error instanceof ResourceNotFoundException$5) {
|
|
12558
12563
|
const clientRegion = await this.logsClient.config.region();
|
|
12559
12564
|
assertRegionMatch(clientRegion, context?.expectedRegion, resourceType, logicalId, physicalId);
|
|
12560
|
-
this.
|
|
12565
|
+
this.logGoneOnDelete(logicalId, physicalId, context);
|
|
12561
12566
|
return;
|
|
12562
12567
|
}
|
|
12563
12568
|
const cause = error instanceof Error ? error : void 0;
|
|
12564
12569
|
throw new ProvisioningError(`Failed to delete log group ${logicalId}: ${error instanceof Error ? error.message : String(error)}`, resourceType, logicalId, physicalId, cause);
|
|
12565
12570
|
}
|
|
12566
12571
|
}
|
|
12572
|
+
logGoneOnDelete(logicalId, physicalId, context) {
|
|
12573
|
+
if (context?.failedCreateOrphan === true) this.logger.info(safeMsg` Log group ${physicalId} (${logicalId}), which a failed deploy created, is already gone; nothing to delete`);
|
|
12574
|
+
else this.logger.debug(`Log group ${physicalId} does not exist, skipping deletion`);
|
|
12575
|
+
}
|
|
12576
|
+
async isSameResource(journaledPhysicalId, record, resourceType, context) {
|
|
12577
|
+
if (resourceType !== LOG_GROUP_TYPE) return "unknown";
|
|
12578
|
+
if (!isLogGroupName(journaledPhysicalId) || !isLogGroupName(record.physicalId)) return "unknown";
|
|
12579
|
+
if (journaledPhysicalId === record.physicalId) return "same";
|
|
12580
|
+
if (journaledPhysicalId.toLowerCase() === record.physicalId.toLowerCase()) return "unknown";
|
|
12581
|
+
if (await this.logsClient.config.region() !== context.expectedRegion) return "unknown";
|
|
12582
|
+
const recordGroup = await this.readIdentityIfExists(record.physicalId);
|
|
12583
|
+
if (recordGroup === void 0) return "unknown";
|
|
12584
|
+
const journaledGroup = await this.readIdentityIfExists(journaledPhysicalId);
|
|
12585
|
+
if (journaledGroup === void 0) return "different";
|
|
12586
|
+
return journaledGroup.arn === recordGroup.arn ? "same" : "different";
|
|
12587
|
+
}
|
|
12588
|
+
async resourceIdentity(physicalId, resourceType, context) {
|
|
12589
|
+
if (resourceType !== LOG_GROUP_TYPE || !isLogGroupName(physicalId)) return void 0;
|
|
12590
|
+
if (await this.logsClient.config.region() !== context.expectedRegion) return void 0;
|
|
12591
|
+
const group = await this.readIdentityIfExists(physicalId);
|
|
12592
|
+
if (group === void 0) return RESOURCE_NOT_FOUND;
|
|
12593
|
+
if (group.creationTime === void 0) return void 0;
|
|
12594
|
+
return `${group.arn}@${group.creationTime}`;
|
|
12595
|
+
}
|
|
12596
|
+
async readIdentityIfExists(name) {
|
|
12597
|
+
let found;
|
|
12598
|
+
try {
|
|
12599
|
+
const response = await this.logsClient.send(new DescribeLogGroupsCommand({ logGroupNamePrefix: name }));
|
|
12600
|
+
found = response.logGroups?.find((g) => g.logGroupName === name);
|
|
12601
|
+
if (found === void 0 && response.nextToken) throw new Error("CloudWatch Logs did not list the log group on a first page that has more pages");
|
|
12602
|
+
} catch (error) {
|
|
12603
|
+
if (error instanceof ResourceNotFoundException$5) return void 0;
|
|
12604
|
+
throw error;
|
|
12605
|
+
}
|
|
12606
|
+
if (found === void 0) return void 0;
|
|
12607
|
+
const arn = found.logGroupArn;
|
|
12608
|
+
if (typeof arn !== "string" || arn === "") throw new Error("CloudWatch Logs returned no logGroupArn");
|
|
12609
|
+
const created = found.creationTime;
|
|
12610
|
+
return {
|
|
12611
|
+
arn,
|
|
12612
|
+
creationTime: typeof created === "number" && Number.isSafeInteger(created) && created > 0 ? created : void 0
|
|
12613
|
+
};
|
|
12614
|
+
}
|
|
12567
12615
|
async buildArn(logGroupName) {
|
|
12568
12616
|
try {
|
|
12569
12617
|
const accountId = (await this.stsClient.send(new GetCallerIdentityCommand({}))).Account;
|
|
@@ -21739,8 +21787,9 @@ var AgentCoreRuntimeProvider = class {
|
|
|
21739
21787
|
throw new ProvisioningError(`Failed to create BedrockAgentCore Runtime ${logicalId}: ${error instanceof Error ? error.message : String(error)}`, resourceType, logicalId, void 0, cause);
|
|
21740
21788
|
}
|
|
21741
21789
|
}
|
|
21742
|
-
async update(logicalId, physicalId, resourceType, properties, _previousProperties) {
|
|
21790
|
+
async update(logicalId, physicalId, resourceType, properties, _previousProperties, context) {
|
|
21743
21791
|
this.logger.debug(`Updating BedrockAgentCore Runtime ${logicalId}: ${physicalId}`);
|
|
21792
|
+
assertRegionMatch(context?.expectedRegion ? await this.client.config.region() : void 0, context?.expectedRegion, resourceType, logicalId, physicalId, "pre-update");
|
|
21744
21793
|
const roleArn = properties["RoleArn"];
|
|
21745
21794
|
if (!roleArn) throw new ProvisioningError(`RoleArn is required for ${logicalId}`, resourceType, logicalId, physicalId);
|
|
21746
21795
|
try {
|
|
@@ -21891,7 +21940,7 @@ var AgentCoreBrowserProvider = class {
|
|
|
21891
21940
|
throw new ProvisioningError(`Failed to adopt the AWS-managed default browser for ${logicalId}: ${error instanceof Error ? error.message : String(error)}. Bedrock AgentCore may not be available in this region.`, resourceType, logicalId, void 0, cause);
|
|
21892
21941
|
}
|
|
21893
21942
|
}
|
|
21894
|
-
async update(logicalId, physicalId, _resourceType, _properties, _previousProperties) {
|
|
21943
|
+
async update(logicalId, physicalId, _resourceType, _properties, _previousProperties, _context) {
|
|
21895
21944
|
this.logger.debug(`No-op update for default browser ${logicalId}`);
|
|
21896
21945
|
return {
|
|
21897
21946
|
physicalId,
|
|
@@ -21958,7 +22007,7 @@ var AgentCoreCodeInterpreterProvider = class {
|
|
|
21958
22007
|
throw new ProvisioningError(`Failed to adopt the AWS-managed default code interpreter for ${logicalId}: ${error instanceof Error ? error.message : String(error)}. Bedrock AgentCore may not be available in this region.`, resourceType, logicalId, void 0, cause);
|
|
21959
22008
|
}
|
|
21960
22009
|
}
|
|
21961
|
-
async update(logicalId, physicalId, _resourceType, _properties, _previousProperties) {
|
|
22010
|
+
async update(logicalId, physicalId, _resourceType, _properties, _previousProperties, _context) {
|
|
21962
22011
|
this.logger.debug(`No-op update for default code interpreter ${logicalId}`);
|
|
21963
22012
|
return {
|
|
21964
22013
|
physicalId,
|
|
@@ -22054,8 +22103,9 @@ var AgentCoreEvaluatorProvider = class {
|
|
|
22054
22103
|
throw new ProvisioningError(`Failed to create BedrockAgentCore Evaluator ${logicalId}: ${error instanceof Error ? error.message : String(error)}`, resourceType, logicalId, void 0, cause);
|
|
22055
22104
|
}
|
|
22056
22105
|
}
|
|
22057
|
-
async update(logicalId, physicalId, resourceType, properties, previousProperties) {
|
|
22106
|
+
async update(logicalId, physicalId, resourceType, properties, previousProperties, context) {
|
|
22058
22107
|
this.logger.debug(`Updating BedrockAgentCore Evaluator ${logicalId}: ${physicalId}`);
|
|
22108
|
+
assertRegionMatch(context?.expectedRegion ? await this.client.config.region() : void 0, context?.expectedRegion, resourceType, logicalId, physicalId, "pre-update");
|
|
22059
22109
|
refuseMalformedDesiredTags(properties["Tags"], resourceType, logicalId, physicalId);
|
|
22060
22110
|
try {
|
|
22061
22111
|
const input = { evaluatorId: evaluatorIdFromArn(physicalId) };
|
|
@@ -24120,6 +24170,21 @@ function elbv2ArnScope(resourceType, physicalId) {
|
|
|
24120
24170
|
const match = ELBV2_ARN_PATTERNS.get(resourceType)?.exec(physicalId);
|
|
24121
24171
|
return match ? `${match[1]}:${match[2]}:${match[3]}` : void 0;
|
|
24122
24172
|
}
|
|
24173
|
+
const LISTENER_LEFT_IN_PLACE_ON_REMOVAL = [
|
|
24174
|
+
"AlpnPolicy",
|
|
24175
|
+
"Certificates",
|
|
24176
|
+
"MutualAuthentication",
|
|
24177
|
+
"Port",
|
|
24178
|
+
"Protocol",
|
|
24179
|
+
"SslPolicy"
|
|
24180
|
+
];
|
|
24181
|
+
const LISTENER_TLS_DOWNGRADE = /* @__PURE__ */ new Map([["HTTPS", "HTTP"], ["TLS", "TCP"]]);
|
|
24182
|
+
const CLEARED_BY_TLS_DOWNGRADE = /* @__PURE__ */ new Set(["SslPolicy", "Certificates"]);
|
|
24183
|
+
const listenerLeftInPlaceWarning = (logicalId, names, caller) => {
|
|
24184
|
+
const one = names.length === 1;
|
|
24185
|
+
const subject = one ? "property" : "properties";
|
|
24186
|
+
return caller === "rollback" ? safeMsg`${logicalId} (AWS::ElasticLoadBalancingV2::Listener): ${subject} ${names.join(", ")} ${one ? "is" : "are"} absent from the state being restored; ModifyListener keeps a setting it is not sent, so the rollback leaves the value the failed deploy applied in place.` : safeMsg`${logicalId} (AWS::ElasticLoadBalancingV2::Listener): ${subject} ${names.join(", ")} ${one ? "was" : "were"} removed from the template; ModifyListener keeps a setting it is not sent and cdkd sends no reset, so the current AWS value stays in place. Declare the intended value explicitly to change it.`;
|
|
24187
|
+
};
|
|
24123
24188
|
var ELBv2Provider = class {
|
|
24124
24189
|
elbv2Client;
|
|
24125
24190
|
providerRegion = ambientRegion();
|
|
@@ -24177,6 +24242,13 @@ var ELBv2Provider = class {
|
|
|
24177
24242
|
"Tags"
|
|
24178
24243
|
])]
|
|
24179
24244
|
]);
|
|
24245
|
+
removalHandledInUpdate = /* @__PURE__ */ new Map([["AWS::ElasticLoadBalancingV2::Listener", /* @__PURE__ */ new Set([
|
|
24246
|
+
"LoadBalancerArn",
|
|
24247
|
+
"DefaultActions",
|
|
24248
|
+
"ListenerAttributes",
|
|
24249
|
+
"Tags",
|
|
24250
|
+
...LISTENER_LEFT_IN_PLACE_ON_REMOVAL
|
|
24251
|
+
])]]);
|
|
24180
24252
|
getClient() {
|
|
24181
24253
|
if (!this.elbv2Client) this.elbv2Client = new ElasticLoadBalancingV2Client({
|
|
24182
24254
|
...ambientClientDefaults(),
|
|
@@ -24222,7 +24294,7 @@ var ELBv2Provider = class {
|
|
|
24222
24294
|
switch (resourceType) {
|
|
24223
24295
|
case "AWS::ElasticLoadBalancingV2::LoadBalancer": return this.updateLoadBalancer(logicalId, physicalId, resourceType, properties, previousProperties, context?.maskSecrets, context?.desiredFromAwsReadback === true);
|
|
24224
24296
|
case "AWS::ElasticLoadBalancingV2::TargetGroup": return this.updateTargetGroup(logicalId, physicalId, resourceType, properties, previousProperties, context?.maskSecrets, context?.desiredFromAwsReadback === true);
|
|
24225
|
-
case "AWS::ElasticLoadBalancingV2::Listener": return this.updateListener(logicalId, physicalId, resourceType, properties, previousProperties, context
|
|
24297
|
+
case "AWS::ElasticLoadBalancingV2::Listener": return this.updateListener(logicalId, physicalId, resourceType, properties, previousProperties, context);
|
|
24226
24298
|
default: throw new ProvisioningError(`Unsupported resource type: ${resourceType}`, resourceType, logicalId, physicalId);
|
|
24227
24299
|
}
|
|
24228
24300
|
}
|
|
@@ -24806,9 +24878,16 @@ var ELBv2Provider = class {
|
|
|
24806
24878
|
throw thrown;
|
|
24807
24879
|
}
|
|
24808
24880
|
}
|
|
24809
|
-
async updateListener(logicalId, physicalId, resourceType, properties, previousProperties,
|
|
24881
|
+
async updateListener(logicalId, physicalId, resourceType, properties, previousProperties, context) {
|
|
24882
|
+
const maskSecrets = context?.maskSecrets;
|
|
24883
|
+
const fromReadback = context?.desiredFromAwsReadback === true;
|
|
24810
24884
|
this.logger.debug(`Updating Listener ${logicalId}: ${physicalId}`);
|
|
24811
24885
|
refuseMalformedDesiredTags(properties["Tags"], resourceType, logicalId, physicalId);
|
|
24886
|
+
const removed = context?.removedProperties;
|
|
24887
|
+
const desiredProtocol = properties["Protocol"];
|
|
24888
|
+
const previousProtocol = previousProperties["Protocol"];
|
|
24889
|
+
const tlsDowngrade = typeof desiredProtocol === "string" && typeof previousProtocol === "string" && LISTENER_TLS_DOWNGRADE.get(previousProtocol) === desiredProtocol;
|
|
24890
|
+
const leftInPlaceNames = LISTENER_LEFT_IN_PLACE_ON_REMOVAL.filter((key) => (removed !== void 0 ? removed.has(key) : properties[key] === void 0 && previousProperties[key] !== void 0) && !(tlsDowngrade && CLEARED_BY_TLS_DOWNGRADE.has(key)));
|
|
24812
24891
|
try {
|
|
24813
24892
|
const defaultActions = this.convertActions(properties["DefaultActions"]);
|
|
24814
24893
|
const certificates = this.convertCertificates(properties["Certificates"]);
|
|
@@ -24843,6 +24922,7 @@ var ELBv2Provider = class {
|
|
|
24843
24922
|
}
|
|
24844
24923
|
await this.applyTagDiff(physicalId, resourceType, logicalId, previousProperties["Tags"], properties["Tags"], maskSecrets);
|
|
24845
24924
|
this.logger.debug(`Successfully updated Listener ${logicalId}`);
|
|
24925
|
+
if (leftInPlaceNames.length > 0 && !fromReadback) this.logger.warn(listenerLeftInPlaceWarning(logicalId, leftInPlaceNames, context?.replayingState ? "rollback" : "deploy"));
|
|
24846
24926
|
return {
|
|
24847
24927
|
physicalId,
|
|
24848
24928
|
wasReplaced: false,
|
|
@@ -27045,9 +27125,10 @@ var DocDBSubnetGroupProvider = class {
|
|
|
27045
27125
|
throw new ProvisioningError(`Failed to create DocDB DBSubnetGroup ${logicalId}: ${error instanceof Error ? error.message : String(error)}`, resourceType, logicalId, dbSubnetGroupName, cause);
|
|
27046
27126
|
}
|
|
27047
27127
|
}
|
|
27048
|
-
async update(logicalId, physicalId, resourceType, properties, previousProperties) {
|
|
27128
|
+
async update(logicalId, physicalId, resourceType, properties, previousProperties, context) {
|
|
27049
27129
|
this.assertType(resourceType, logicalId, physicalId);
|
|
27050
27130
|
this.logger.debug(safeMsg`Updating DocDB DBSubnetGroup ${logicalId}: ${physicalId}`);
|
|
27131
|
+
assertRegionMatch(context?.expectedRegion ? await this.getClient().config.region() : void 0, context?.expectedRegion, resourceType, logicalId, physicalId, "pre-update");
|
|
27051
27132
|
refuseMalformedDesiredTags(properties["Tags"], resourceType, logicalId, physicalId);
|
|
27052
27133
|
try {
|
|
27053
27134
|
const subnetIds = properties["SubnetIds"];
|
|
@@ -40779,7 +40860,8 @@ var FirehoseProvider = class {
|
|
|
40779
40860
|
throw thrown;
|
|
40780
40861
|
}
|
|
40781
40862
|
}
|
|
40782
|
-
async update(logicalId, physicalId, resourceType, properties, previousProperties) {
|
|
40863
|
+
async update(logicalId, physicalId, resourceType, properties, previousProperties, context) {
|
|
40864
|
+
assertRegionMatch(context?.expectedRegion ? await this.getClient().config.region() : void 0, context?.expectedRegion, resourceType, logicalId, physicalId, "pre-update");
|
|
40783
40865
|
try {
|
|
40784
40866
|
return await this.applyUpdate(logicalId, physicalId, resourceType, properties, previousProperties);
|
|
40785
40867
|
} catch (error) {
|
|
@@ -42916,7 +42998,8 @@ var DLMLifecyclePolicyProvider = class {
|
|
|
42916
42998
|
throw new ProvisioningError(`Failed to create DLM Lifecycle Policy ${logicalId}: ${cause?.message ?? String(error)}`, resourceType, logicalId, void 0, cause);
|
|
42917
42999
|
}
|
|
42918
43000
|
}
|
|
42919
|
-
async update(logicalId, physicalId, resourceType, properties, previousProperties) {
|
|
43001
|
+
async update(logicalId, physicalId, resourceType, properties, previousProperties, context) {
|
|
43002
|
+
assertRegionMatch(context?.expectedRegion ? await this.getClient().config.region() : void 0, context?.expectedRegion, resourceType, logicalId, physicalId, "pre-update");
|
|
42920
43003
|
refuseMalformedDesiredTags(properties["Tags"], resourceType, logicalId, physicalId);
|
|
42921
43004
|
if (JSON.stringify(properties["DefaultPolicy"]) !== JSON.stringify(previousProperties["DefaultPolicy"])) throw new ResourceUpdateNotSupportedError(resourceType, logicalId, "DefaultPolicy cannot be changed in place; re-run with `cdkd deploy --replace` to recreate the policy (--replace is a boolean flag and takes no resource id; it applies to every resource in the run whose in-place update is refused)");
|
|
42922
43005
|
this.logger.debug(`Updating DLM Lifecycle Policy ${logicalId} (${physicalId})`);
|
|
@@ -44869,7 +44952,7 @@ var WaitConditionHandleProvider = class {
|
|
|
44869
44952
|
attributes: {}
|
|
44870
44953
|
};
|
|
44871
44954
|
}
|
|
44872
|
-
async update(logicalId, physicalId, _resourceType, _properties, _previousProperties) {
|
|
44955
|
+
async update(logicalId, physicalId, _resourceType, _properties, _previousProperties, _context) {
|
|
44873
44956
|
this.logger.debug(`No-op update for WaitConditionHandle ${logicalId}`);
|
|
44874
44957
|
return {
|
|
44875
44958
|
physicalId,
|
|
@@ -45234,4 +45317,4 @@ var ACMCertificateProvider = class {
|
|
|
45234
45317
|
|
|
45235
45318
|
//#endregion
|
|
45236
45319
|
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 };
|
|
45237
|
-
//# sourceMappingURL=provider-classes-
|
|
45320
|
+
//# sourceMappingURL=provider-classes-DmohfhIq.js.map
|