@go-to-k/cdkd 0.318.0 → 0.320.0
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-kV8DYFjT.js → asg-provider-B4XVfH0S.js} +3 -3
- package/dist/{asg-provider-kV8DYFjT.js.map → asg-provider-B4XVfH0S.js.map} +1 -1
- package/dist/cli.js +2 -2
- package/dist/{created-resource-sink-BpB3iPvn.js → created-resource-sink-CmrPwGge.js} +4 -2
- package/dist/created-resource-sink-CmrPwGge.js.map +1 -0
- package/dist/{db-instance-modify-retry-CspmK57I.js → db-instance-modify-retry-DCLA_p9I.js} +2 -2
- package/dist/{db-instance-modify-retry-CspmK57I.js.map → db-instance-modify-retry-DCLA_p9I.js.map} +1 -1
- package/dist/{deploy-engine-BnEvzfon.js → deploy-engine-BiJyU4j1.js} +76 -44
- package/dist/deploy-engine-BiJyU4j1.js.map +1 -0
- package/dist/{iam-role-provider-3w71Eu4a.js → iam-role-provider-FsEgUieT.js} +41 -25
- package/dist/iam-role-provider-FsEgUieT.js.map +1 -0
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -3
- package/dist/{neptune-provider-D8tkFP12.js → neptune-provider-DjjNodrS.js} +210 -28
- package/dist/neptune-provider-DjjNodrS.js.map +1 -0
- package/dist/{program-CKm1Nk6t.js → program-Dm0hn2Sn.js} +52 -14
- package/dist/program-Dm0hn2Sn.js.map +1 -0
- package/dist/{provider-classes-CbiecOol.js → provider-classes-BTOXS3cs.js} +316 -72
- package/dist/provider-classes-BTOXS3cs.js.map +1 -0
- package/dist/{rds-provider-bEeid6uI.js → rds-provider-C_r5q9NM.js} +76 -7
- package/dist/rds-provider-C_r5q9NM.js.map +1 -0
- package/dist/{version-CFF8UOVj.js → version-CrtjwYuX.js} +2 -2
- package/dist/{version-CFF8UOVj.js.map → version-CrtjwYuX.js.map} +1 -1
- package/package.json +1 -1
- package/dist/created-resource-sink-BpB3iPvn.js.map +0 -1
- package/dist/deploy-engine-BnEvzfon.js.map +0 -1
- package/dist/iam-role-provider-3w71Eu4a.js.map +0 -1
- package/dist/neptune-provider-D8tkFP12.js.map +0 -1
- package/dist/program-CKm1Nk6t.js.map +0 -1
- package/dist/provider-classes-CbiecOol.js.map +0 -1
- package/dist/rds-provider-bEeid6uI.js.map +0 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { r as getAwsClients, s as withApiGatewayPacing } from "./aws-clients-DWpHZk2l.js";
|
|
2
2
|
import { $ as safeMsg, A as isBeforeStateRead, E as generatedNameFor, J as displaySafe, N as recordedGeneratedNameKept, O as getCurrentStackInstanceId, Q as plainIdentOr, T as generateResourceNameWithFallback, V as SECRET_REF_MAX_CODE_POINTS, X as isPasteableIdent, Y as displayStackName, a as safeStringify, i as isAwsAuthoredFailure, n as describeAwsFailure, q as displayIdent, r as describeAwsStatusReason, s as getLogger, t as VERBOSE_POINTER, w as generateResourceName } from "./aws-failure-text-DiHodi76.js";
|
|
3
|
-
import { $ as isTerminalDeleteFailure, A as setBounded, Ar as isThrottlingError, At as stateOrphanRecordRemedy, B as normalizeAwsTagsToCfn, C as AmbiguousCreateLatch, Cr as isExplicitDenyError, Ct as compositeIdFormatMessage, D as isInsideWindow, Dt as packCompositeId, E as createAttemptKey, Er as isTransientServerError, Et as logicalIdShown, F as assertRegionMatch, Fn as ResourceUpdateNotSupportedError, Ft as maskerOrIdentity, Gt as markAuxiliaryFailure, H as refusalTypeShown, I as VALUE_NOT_SHOWN, It as withDerivedNameMasks, J as deleteAfterProtectionFlipWithFinalSnapshot, K as ProtectionFlipRegistry, Kt as markCreatedBeforeFailure, L as isPlainImportJson, M as RESOURCE_NOT_FOUND, Mr as markRedactedCause, Mt as createMaskedRetryLogger, Nn as ProvisioningError, Nr as wrapMaskedAwsError, Nt as isSecretDerivedValue, O as replayFollowedAmbiguousAttempt, Or as THROTTLING_ERROR_NAMES, P as markNotGone, Pt as maskDeep, Q as isTerminalDbWaitStatus, Qn as pasteableCommand, R as isPlainImportValue, S as AMBIGUOUS_LATCH_TTL_MS, Sr as isAmbiguousOutcomeError, St as canonicalizeRoute53QueryName, T as ambiguousAttemptLead, Tr as isRetryableTransientError, Tt as compositeIdSkipResult, U as remedyLogicalId, Ut as isAuxiliaryFailure, V as quotedRemedyLogicalId, W as resolveExplicitPhysicalId, Xn as hasClauseBreak, Y as deleteWithProtectionCompensation, Yn as commandHole, Z as isProceedDbStatus, Zn as isInertUnquoted, b as withRemovalDefaults, bt as isInterruptedWaitError, ct as UNNAMEABLE_ID_CLAUSE, d as onlySecretDerived, dn as withPasteableAwsProfile, dt as pasteableAwsCommand, er as plainOrDescribed, et as logGroupProtectionSite, f as readPrincipalLists, fn as ambientClientDefaults, ft as protectedReplacementAdvice, g as clearOnUpdateRemoval, gn as AccountIdUnavailableError, hn as credentialFingerprint, hr as relayedNameCollision, ht as ElapsedBudgetRegistry, i as reportCreatedResource, ir as withheldTargetClause, j as withoutServerErrorRetries, jr as markNonRetryable, jt as createMaskedLogSinks, k as replayedSendWindow, kr as isMarkedNonRetryable, kt as segmentAfterAnchor, l as SECRET_DERIVED_READ_LIVE, lt as WITHHELD_AWS_COMMAND, m as recordedPrincipalsRepair, mn as clientDefaultsFor, mr as markReplayMayCollide, mt as ElapsedBudget, nt as protectionFlipKey, o as retractCreatedResource, on as injectiveKey, ot as userPoolProtectionSite, pn as ambientCredentialConfig, pr as markNameCollision, pt as renderDisableCommand, qt as markSupersedesEarlierCreate, rr as shellQuote, rt as rdsFamilyProtectionSite, sn as injectiveKeyPrefix, tt as observeThenDisableProtection, u as holdsSecretDerivedEntry, ut as isAwsCliLiteral, vn as CdkdError, w as RecentIdSet, wt as compositeIdSeparatorRefusal, xt as startInterruptWatch, y as removedTemplateKeys, yr as explicitDenyPolicyKind, z as isQuotableImportValue, zt as clearCreatedBeforeFailure } from "./created-resource-sink-
|
|
3
|
+
import { $ as isTerminalDeleteFailure, A as setBounded, Ar as isThrottlingError, At as stateOrphanRecordRemedy, B as normalizeAwsTagsToCfn, C as AmbiguousCreateLatch, Cr as isExplicitDenyError, Ct as compositeIdFormatMessage, D as isInsideWindow, Dt as packCompositeId, E as createAttemptKey, Er as isTransientServerError, Et as logicalIdShown, F as assertRegionMatch, Fn as ResourceUpdateNotSupportedError, Ft as maskerOrIdentity, Gt as markAuxiliaryFailure, H as refusalTypeShown, I as VALUE_NOT_SHOWN, It as withDerivedNameMasks, J as deleteAfterProtectionFlipWithFinalSnapshot, K as ProtectionFlipRegistry, Kt as markCreatedBeforeFailure, L as isPlainImportJson, M as RESOURCE_NOT_FOUND, Mr as markRedactedCause, Mt as createMaskedRetryLogger, Nn as ProvisioningError, Nr as wrapMaskedAwsError, Nt as isSecretDerivedValue, O as replayFollowedAmbiguousAttempt, Or as THROTTLING_ERROR_NAMES, P as markNotGone, Pt as maskDeep, Q as isTerminalDbWaitStatus, Qn as pasteableCommand, R as isPlainImportValue, S as AMBIGUOUS_LATCH_TTL_MS, Sr as isAmbiguousOutcomeError, St as canonicalizeRoute53QueryName, T as ambiguousAttemptLead, Tr as isRetryableTransientError, Tt as compositeIdSkipResult, U as remedyLogicalId, Ut as isAuxiliaryFailure, V as quotedRemedyLogicalId, W as resolveExplicitPhysicalId, Xn as hasClauseBreak, Y as deleteWithProtectionCompensation, Yn as commandHole, Z as isProceedDbStatus, Zn as isInertUnquoted, b as withRemovalDefaults, bt as isInterruptedWaitError, ct as UNNAMEABLE_ID_CLAUSE, d as onlySecretDerived, dn as withPasteableAwsProfile, dt as pasteableAwsCommand, er as plainOrDescribed, et as logGroupProtectionSite, f as readPrincipalLists, fn as ambientClientDefaults, ft as protectedReplacementAdvice, g as clearOnUpdateRemoval, gn as AccountIdUnavailableError, hn as credentialFingerprint, hr as relayedNameCollision, ht as ElapsedBudgetRegistry, i as reportCreatedResource, ir as withheldTargetClause, j as withoutServerErrorRetries, jr as markNonRetryable, jt as createMaskedLogSinks, k as replayedSendWindow, kr as isMarkedNonRetryable, kt as segmentAfterAnchor, l as SECRET_DERIVED_READ_LIVE, lt as WITHHELD_AWS_COMMAND, m as recordedPrincipalsRepair, mn as clientDefaultsFor, mr as markReplayMayCollide, mt as ElapsedBudget, nt as protectionFlipKey, o as retractCreatedResource, on as injectiveKey, ot as userPoolProtectionSite, pn as ambientCredentialConfig, pr as markNameCollision, pt as renderDisableCommand, qt as markSupersedesEarlierCreate, rr as shellQuote, rt as rdsFamilyProtectionSite, sn as injectiveKeyPrefix, tt as observeThenDisableProtection, u as holdsSecretDerivedEntry, ut as isAwsCliLiteral, vn as CdkdError, w as RecentIdSet, wt as compositeIdSeparatorRefusal, xt as startInterruptWatch, y as removedTemplateKeys, yr as explicitDenyPolicyKind, z as isQuotableImportValue, zt as clearCreatedBeforeFailure } from "./created-resource-sink-CmrPwGge.js";
|
|
4
4
|
import { c as ambientRegion } from "./aws-client-defaults-BLXFsfMa.js";
|
|
5
|
-
import { $ as sendTtlWaitingOutRateLimit, A as DYNAMODB_DELETE_MIN_RESOURCE_TIMEOUT_MS,
|
|
6
|
-
import { n as collectInlinePolicyNamesManagedBySiblings, r as
|
|
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 { n as modifyDbInstanceWhenAvailable } from "./db-instance-modify-retry-
|
|
9
|
-
import { RDSProvider } from "./rds-provider-
|
|
10
|
-
import { NeptuneProvider } from "./neptune-provider-
|
|
11
|
-
import { ASGProvider } from "./asg-provider-
|
|
5
|
+
import { $ as sendTtlWaitingOutRateLimit, A as DYNAMODB_DELETE_MIN_RESOURCE_TIMEOUT_MS, B as deleteTableWithIndexBusyRetry, Ba as s3BucketArn, Bc as passedNoEchoParametersOf, Bi as isRefusedByName, C as planContributorInsightsOp, Cl as recordAttributeIdCopy, Ct as enclosingDeadlineExpired, D as reverseMapTableContributorInsights, Da as reDisableInstanceApiTermination, Dc as lambdaFunctionNameForMask, E as reverseMapIndexContributorInsights, Ea as observeThenDisableInstanceApiTermination, Ec as canonicalLambdaFunctionName, El as carriesSecretMask, Eo as parseWebACLArn, F as resolveDynamoDbDeleteBudgetClock, Fd as displayAssemblyPath, G as readbackVectorIndexes, Gi as readTagList, Gn as isRedactedRecordedValue, H as relayedIndexBusyDelete, Ha as s3BucketDualStackDomainName, Hi as DBPROXY_TAGS_WHAT, Hn as getCurrentProducerRegions, I as resolveDynamoDbDeleteBudgetMs, Id as renderAssemblyPathEscape, Ii as acquireIdempotencyToken, Io as accountArgs, J as vectorIndexesShapeDetail, Jc as recordReferenceProvenanceEntry, Ji as tagPlanWarning, Js as withoutSilentDropProperties, Jt as getCurrentNestedStackContext, K as vectorIndexesForCreate, Kc as markSameGenerationBag, Ki as refuseMalformedDesiredTags, Kn as redactedDeleteAddressFields, Ks as findSilentDropProperties, L as DELETE_INDEX_WAIT_PROCEED_NOTE, Ld as resolveAssemblyPath, M as beginDeleteWait, Mi as earliestDefined, N as compensateRemovedDeletionProtection, O as stripIndexContributorInsights, Oa as reEnableInstanceApiTermination, Oc as sameLambdaFunctionAddress, P as deleteBudgetKey, Pd as describeFileReadFailure, Pi as reserveStackCreateToken, Q as readTtlSpec, Qc as hasMaskableValues, R as INDEX_SETTLE_POLL_INTERVAL_MS, S as indexDeclaresContributorInsights, Sa as markWaitAbandoned, Sc as blockDeviceMappingsDifferOnlyInDeleteOnTermination, Sl as physicalNameCopiesOf, T as readContributorInsightsSpec, Ta as isTerminationProtectionPropagationError, Tc as emrClusterInstancesReplaced, U as waitForIndexesSettled, Ua as s3BucketRegionalDomainName, Ui as DBPROXY_TAG_OPTIONS, Ur as replacedDeleteFailureVerdict, Us as withheldAccountClause, V as maskedLogger, Va as s3BucketDomainName, Vi as markDeleteStarted, Vr as getStackRecords, Vt as getNestedRevertRun, W as planVectorIndexUpdates, Wa as s3BucketWebsiteUrl, Wi as planTagDiff, Wn as REDACTED_DELETE_ADDRESS_SKIP_REASON, Wt as revertNestedChildFromJournal, X as isTtlRateLimited, Xi as stringifyIfAssigned, Y as isTtlAlreadyDisabled, Ya as outputReferenceProvenanceOf, Yc as snapshotPassProvenance, Yi as definedAttributes, Yt as withNestedStackContext, Z as planTimeToLive, _ as streamMemberRefusals, _c as requireConfigString, _d as decodeListingKey, _t as renderNestedTemplateTreeDefect, ac as isWarmThroughputDecrease, an as chunks, at as markRefusedBeforeApplying, b as CONTRIBUTOR_INSIGHTS_KEY, ba as withIndeterminateGuard, bd as canonicalizeRegion, c as DynamoDBGlobalTableProvider, cc as coerceCfnBoolean, cn as withApiLimit, d as declaredStreamPolicyMember, dc as configIntegerRefusal, ds as refuseMalformedNestedChildOutputs, et as ECR_AUTO_DELETE_IMAGES_TAG, f as declaredStreamTagsMember, fa as slowCcOperationTimeoutMs, fc as configStringRefusal, fl as withoutPhysicalNameCopies, g as streamDeclaresTags, gc as requireConfigObject, gt as listNestedTemplateRows, h as streamDeclaresPolicy, hc as requireConfigArray, ho as getAccountInfo, ht as isAbsoluteAssetPath, ic as coerceWarmThroughput$1, it as getPriorAttempts, j as DYNAMODB_DELETE_POLL_COST_MS, ja as isUsableAttemptedName, js as refuseMalformedResourcesForDestroy, k as DYNAMODB_DELETE_DEADLINE_MARGIN_MS, ko as passedParameterClassesOf, l as STREAM_POLICY_KEY, lc as coerceCfnInteger, m as reverseMapStreamPolicy, ma as unchangedBehindSecretReference, mc as replayWarn, ml as dynamicReferenceTokens, mt as findNestedTemplateTreeDefect, na as waitForLambdaFunctionActive, nt as hasCdkAutoDeleteTag, oa as getCurrentResourceSecrets, oc as toCfnInteger, on as isAccessDeniedError, p as planStreamMemberOps, pa as onlySecretReferencesDiffer, pc as readConfigString, pu as stringifyValue, q as vectorIndexesSettled, qc as redactForState, qi as tagMapAsList, qn as redactedDeleteAddressSkip, rc as WARM_THROUGHPUT_MEMBERS, rt as isTruthyCfnBoolean, sc as toFiniteNumber, sn as lookupEachName, t as DeployEngine, tt as S3_AUTO_DELETE_OBJECTS_TAG, u as STREAM_TAGS_KEY, uc as configBooleanRefusal, uu as timePhase, v as streamPolicyMatchesDeclared, vu as rewriteTemplateAssetReferences, w as planIndexContributorInsightsOps, wa as ec2InstanceProtectionSite, wc as ecsServiceLaunchTypeSetOrChanged, wt as enclosingDeadlineRemainingMs, x as contributorInsightsRefusals, xa as isWaitAbandonedError, xc as withRetry, xd as derivePartitionAndUrlSuffix, xl as recoverMaskedOutput, y as streamTagsMatchDeclared, ya as deleteSkipReason, yi as secretNamedAttributeNamesOf, z as TABLE_INDEX_NOUN, za as isSettledInstanceState, zr as awaitInFlightSibling } from "./deploy-engine-BiJyU4j1.js";
|
|
6
|
+
import { a as IamCreateClientCache, i as isEntityAlreadyExists, n as collectInlinePolicyNamesManagedBySiblings, r as iamEntityLeftByThisCreate, t as IAMRoleProvider } from "./iam-role-provider-FsEgUieT.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-Dm0hn2Sn.js";
|
|
8
|
+
import { n as modifyDbInstanceWhenAvailable } from "./db-instance-modify-retry-DCLA_p9I.js";
|
|
9
|
+
import { RDSProvider } from "./rds-provider-C_r5q9NM.js";
|
|
10
|
+
import { NeptuneProvider } from "./neptune-provider-DjjNodrS.js";
|
|
11
|
+
import { ASGProvider } from "./asg-provider-B4XVfH0S.js";
|
|
12
12
|
import { createHash, randomUUID } from "node:crypto";
|
|
13
13
|
import { CreateBucketCommand, CreateBucketMetadataConfigurationCommand, DeleteBucketAnalyticsConfigurationCommand, DeleteBucketCommand, DeleteBucketCorsCommand, DeleteBucketEncryptionCommand, DeleteBucketIntelligentTieringConfigurationCommand, DeleteBucketInventoryConfigurationCommand, DeleteBucketLifecycleCommand, DeleteBucketMetadataConfigurationCommand, DeleteBucketMetricsConfigurationCommand, DeleteBucketOwnershipControlsCommand, DeleteBucketPolicyCommand, DeleteBucketReplicationCommand, DeleteBucketTaggingCommand, DeleteBucketWebsiteCommand, DeleteObjectsCommand, GetBucketAbacCommand, GetBucketAccelerateConfigurationCommand, GetBucketCorsCommand, GetBucketEncryptionCommand, GetBucketLifecycleConfigurationCommand, GetBucketLocationCommand, GetBucketLoggingCommand, GetBucketMetadataConfigurationCommand, GetBucketNotificationConfigurationCommand, GetBucketOwnershipControlsCommand, GetBucketPolicyCommand, GetBucketReplicationCommand, GetBucketTaggingCommand, GetBucketVersioningCommand, GetBucketWebsiteCommand, GetObjectCommand, GetObjectLockConfigurationCommand, GetPublicAccessBlockCommand, HeadBucketCommand, ListBucketAnalyticsConfigurationsCommand, ListBucketIntelligentTieringConfigurationsCommand, ListBucketInventoryConfigurationsCommand, ListBucketMetricsConfigurationsCommand, ListBucketsCommand, ListObjectVersionsCommand, ListObjectsV2Command, NoSuchBucket, PutBucketAbacCommand, PutBucketAccelerateConfigurationCommand, PutBucketAnalyticsConfigurationCommand, PutBucketCorsCommand, PutBucketEncryptionCommand, PutBucketIntelligentTieringConfigurationCommand, PutBucketInventoryConfigurationCommand, PutBucketLifecycleConfigurationCommand, PutBucketLoggingCommand, PutBucketMetricsConfigurationCommand, PutBucketNotificationConfigurationCommand, PutBucketOwnershipControlsCommand, PutBucketPolicyCommand, PutBucketReplicationCommand, PutBucketTaggingCommand, PutBucketVersioningCommand, PutBucketWebsiteCommand, PutObjectLockConfigurationCommand, PutPublicAccessBlockCommand, S3Client, UpdateBucketMetadataAnnotationTableConfigurationCommand, UpdateBucketMetadataInventoryTableConfigurationCommand, UpdateBucketMetadataJournalTableConfigurationCommand } from "@aws-sdk/client-s3";
|
|
14
14
|
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, UpdateGroupCommand, UpdateLoginProfileCommand, UpdateUserCommand } from "@aws-sdk/client-iam";
|
|
@@ -650,17 +650,39 @@ var IAMManagedPolicyProvider = class {
|
|
|
650
650
|
if (properties["Description"]) createParams.Description = properties["Description"];
|
|
651
651
|
if (properties["Path"]) createParams.Path = properties["Path"];
|
|
652
652
|
if (tags.length > 0) createParams.Tags = tags;
|
|
653
|
-
const
|
|
654
|
-
|
|
655
|
-
|
|
653
|
+
const createClient = await this.createClient.get();
|
|
654
|
+
let policy;
|
|
655
|
+
let adopted = false;
|
|
656
|
+
try {
|
|
657
|
+
policy = (await createClient.send(new CreatePolicyCommand(createParams))).Policy;
|
|
658
|
+
} catch (createError) {
|
|
659
|
+
const expectedArnTail = `:policy${createParams.Path ?? "/"}${policyName}`;
|
|
660
|
+
policy = await iamEntityLeftByThisCreate({
|
|
661
|
+
logicalId,
|
|
662
|
+
resourceType,
|
|
663
|
+
noun: "managed policy",
|
|
664
|
+
displayName: policyName,
|
|
665
|
+
createError,
|
|
666
|
+
namesThisEntity: (reported) => reported.endsWith(expectedArnTail),
|
|
667
|
+
read: async (reportedArn) => (await this.iamClient.send(new GetPolicyCommand({ PolicyArn: reportedArn }))).Policy,
|
|
668
|
+
identityOf: (live) => policyIdentityToken(live?.PolicyId),
|
|
669
|
+
log
|
|
670
|
+
});
|
|
671
|
+
if (policy === void 0) throw createError;
|
|
672
|
+
adopted = true;
|
|
673
|
+
}
|
|
674
|
+
const policyArn = policy?.Arn;
|
|
675
|
+
if (!policyArn) throw new ProvisioningError(`${adopted ? "GetPolicy" : "CreatePolicy"} succeeded but no Arn returned for ${logicalId}`, resourceType, logicalId, policyName);
|
|
656
676
|
leftBehindArn = policyArn;
|
|
657
|
-
createdPolicyIdentity = policyIdentityToken(
|
|
658
|
-
|
|
659
|
-
|
|
677
|
+
createdPolicyIdentity = policyIdentityToken(policy?.PolicyId);
|
|
678
|
+
if (!adopted) {
|
|
679
|
+
reportCreatedResource(logicalId, resourceType, policyArn, createdPolicyIdentity);
|
|
680
|
+
log.debug(`Created IAM managed policy: ${v(policyArn)}`);
|
|
681
|
+
}
|
|
660
682
|
try {
|
|
661
683
|
await this.attachToPrincipals(policyArn, principals.lists.Groups, principals.lists.Roles, principals.lists.Users, log);
|
|
662
684
|
} catch (innerError) {
|
|
663
|
-
try {
|
|
685
|
+
if (!adopted) try {
|
|
664
686
|
await this.detachAllPrincipals(policyArn);
|
|
665
687
|
await this.deleteAllNonDefaultVersions(policyArn);
|
|
666
688
|
await this.iamClient.send(new DeletePolicyCommand({ PolicyArn: policyArn }));
|
|
@@ -1257,17 +1279,40 @@ var IAMInstanceProfileProvider = class {
|
|
|
1257
1279
|
let leftBehind = false;
|
|
1258
1280
|
let createdProfileIdentity;
|
|
1259
1281
|
try {
|
|
1260
|
-
const
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1282
|
+
const createClient = await this.createClient.get();
|
|
1283
|
+
let profile;
|
|
1284
|
+
let adopted = false;
|
|
1285
|
+
try {
|
|
1286
|
+
profile = (await createClient.send(new CreateInstanceProfileCommand({
|
|
1287
|
+
InstanceProfileName: instanceProfileName,
|
|
1288
|
+
Path: path
|
|
1289
|
+
}))).InstanceProfile;
|
|
1290
|
+
} catch (createError) {
|
|
1291
|
+
profile = await iamEntityLeftByThisCreate({
|
|
1292
|
+
logicalId,
|
|
1293
|
+
resourceType,
|
|
1294
|
+
noun: "instance profile",
|
|
1295
|
+
displayName: instanceProfileName,
|
|
1296
|
+
createError,
|
|
1297
|
+
namesThisEntity: (reported) => reported === instanceProfileName,
|
|
1298
|
+
read: async () => (await this.iamClient.send(new GetInstanceProfileCommand({ InstanceProfileName: instanceProfileName }))).InstanceProfile,
|
|
1299
|
+
identityOf: (live) => instanceProfileIdentityToken(live?.InstanceProfileId),
|
|
1300
|
+
log
|
|
1301
|
+
});
|
|
1302
|
+
if (profile === void 0) throw createError;
|
|
1303
|
+
adopted = true;
|
|
1304
|
+
}
|
|
1264
1305
|
leftBehind = true;
|
|
1265
|
-
createdProfileIdentity = instanceProfileIdentityToken(
|
|
1266
|
-
|
|
1267
|
-
|
|
1306
|
+
createdProfileIdentity = instanceProfileIdentityToken(profile?.InstanceProfileId);
|
|
1307
|
+
if (!adopted) {
|
|
1308
|
+
reportCreatedResource(logicalId, resourceType, instanceProfileName, createdProfileIdentity);
|
|
1309
|
+
log.debug(`Created IAM instance profile: ${v(instanceProfileName)}`);
|
|
1310
|
+
}
|
|
1268
1311
|
const attachedRoles = [];
|
|
1312
|
+
const heldRoles = new Set(profile?.Roles?.map((role) => role.RoleName?.toLowerCase()));
|
|
1269
1313
|
try {
|
|
1270
1314
|
if (roles && Array.isArray(roles)) for (const roleName of roles) {
|
|
1315
|
+
if (heldRoles.has(roleName.toLowerCase())) continue;
|
|
1271
1316
|
await this.iamClient.send(new AddRoleToInstanceProfileCommand({
|
|
1272
1317
|
InstanceProfileName: instanceProfileName,
|
|
1273
1318
|
RoleName: roleName
|
|
@@ -1276,7 +1321,7 @@ var IAMInstanceProfileProvider = class {
|
|
|
1276
1321
|
log.debug(`Added role ${v(roleName)} to instance profile ${v(instanceProfileName)}`);
|
|
1277
1322
|
}
|
|
1278
1323
|
} catch (innerError) {
|
|
1279
|
-
try {
|
|
1324
|
+
if (!adopted) try {
|
|
1280
1325
|
for (const roleName of attachedRoles) try {
|
|
1281
1326
|
await this.iamClient.send(new RemoveRoleFromInstanceProfileCommand({
|
|
1282
1327
|
InstanceProfileName: instanceProfileName,
|
|
@@ -1301,7 +1346,7 @@ var IAMInstanceProfileProvider = class {
|
|
|
1301
1346
|
log.debug(`Successfully created IAM instance profile ${logicalId}: ${v(instanceProfileName)}`);
|
|
1302
1347
|
return {
|
|
1303
1348
|
physicalId: instanceProfileName,
|
|
1304
|
-
attributes: { Arn:
|
|
1349
|
+
attributes: { Arn: profile?.Arn }
|
|
1305
1350
|
};
|
|
1306
1351
|
} catch (error) {
|
|
1307
1352
|
const cause = error instanceof Error ? error : void 0;
|
|
@@ -1803,6 +1848,8 @@ function isUserOrGroupType(resourceType) {
|
|
|
1803
1848
|
function userOrGroupIdentityToken(id) {
|
|
1804
1849
|
return typeof id === "string" && id !== "" ? id : void 0;
|
|
1805
1850
|
}
|
|
1851
|
+
const PROFILE_SETTLING_ERROR = "EntityTemporarilyUnmodifiableException";
|
|
1852
|
+
const LOGIN_PROFILE_SETTLING_MESSAGE = "IAM cannot modify the login profile yet: a concurrent update operation has not settled";
|
|
1806
1853
|
const MEMBERSHIP_NO_PROPERTIES_SKIP_REASON = "no properties in state — group membership not removed";
|
|
1807
1854
|
const MEMBERSHIP_MISSING_FIELDS_SKIP_REASON = "GroupName/Users missing from state — membership not removed";
|
|
1808
1855
|
const MEMBERSHIP_MALFORMED_USERS_SKIP_REASON = "malformed Users in state — membership not removed";
|
|
@@ -1938,10 +1985,29 @@ var IAMUserGroupProvider = class {
|
|
|
1938
1985
|
const createParams = { UserName: userName };
|
|
1939
1986
|
if (properties["Path"]) createParams.Path = properties["Path"];
|
|
1940
1987
|
if (properties["Tags"] !== void 0 && properties["Tags"] !== null) createParams.Tags = desiredTags;
|
|
1941
|
-
const
|
|
1988
|
+
const createClient = await this.createClient.get();
|
|
1989
|
+
let user;
|
|
1990
|
+
let adopted = false;
|
|
1991
|
+
try {
|
|
1992
|
+
user = (await createClient.send(new CreateUserCommand(createParams))).User;
|
|
1993
|
+
} catch (createError) {
|
|
1994
|
+
user = await iamEntityLeftByThisCreate({
|
|
1995
|
+
logicalId,
|
|
1996
|
+
resourceType,
|
|
1997
|
+
noun: "user",
|
|
1998
|
+
displayName: userName,
|
|
1999
|
+
createError,
|
|
2000
|
+
namesThisEntity: (reported) => reported === userName,
|
|
2001
|
+
read: async () => (await this.iamClient.send(new GetUserCommand({ UserName: userName }))).User,
|
|
2002
|
+
identityOf: (live) => userOrGroupIdentityToken(live?.UserId),
|
|
2003
|
+
log
|
|
2004
|
+
});
|
|
2005
|
+
if (user === void 0) throw createError;
|
|
2006
|
+
adopted = true;
|
|
2007
|
+
}
|
|
1942
2008
|
leftBehind = true;
|
|
1943
|
-
createdUserIdentity = userOrGroupIdentityToken(
|
|
1944
|
-
reportCreatedResource(logicalId, resourceType, userName, createdUserIdentity);
|
|
2009
|
+
createdUserIdentity = userOrGroupIdentityToken(user?.UserId);
|
|
2010
|
+
if (!adopted) reportCreatedResource(logicalId, resourceType, userName, createdUserIdentity);
|
|
1945
2011
|
try {
|
|
1946
2012
|
const permissionsBoundary = properties["PermissionsBoundary"];
|
|
1947
2013
|
if (permissionsBoundary) {
|
|
@@ -1953,12 +2019,24 @@ var IAMUserGroupProvider = class {
|
|
|
1953
2019
|
}
|
|
1954
2020
|
const loginProfile = properties["LoginProfile"];
|
|
1955
2021
|
if (loginProfile) {
|
|
1956
|
-
|
|
2022
|
+
const profile = {
|
|
1957
2023
|
UserName: userName,
|
|
1958
2024
|
Password: loginProfile.Password,
|
|
1959
2025
|
PasswordResetRequired: loginProfile.PasswordResetRequired ?? false
|
|
1960
|
-
}
|
|
1961
|
-
|
|
2026
|
+
};
|
|
2027
|
+
try {
|
|
2028
|
+
await this.iamClient.send(new CreateLoginProfileCommand(profile));
|
|
2029
|
+
log.debug(`Created login profile for user ${v(userName)}`);
|
|
2030
|
+
} catch (profileError) {
|
|
2031
|
+
if (!adopted || !isEntityAlreadyExists(profileError)) throw profileError;
|
|
2032
|
+
try {
|
|
2033
|
+
await this.iamClient.send(new UpdateLoginProfileCommand(profile));
|
|
2034
|
+
} catch (updateError) {
|
|
2035
|
+
if (updateError?.name !== PROFILE_SETTLING_ERROR) throw updateError;
|
|
2036
|
+
throw new Error(LOGIN_PROFILE_SETTLING_MESSAGE, { cause: updateError });
|
|
2037
|
+
}
|
|
2038
|
+
log.debug(`Updated login profile for user ${v(userName)}`);
|
|
2039
|
+
}
|
|
1962
2040
|
}
|
|
1963
2041
|
const managedPolicyArns = properties["ManagedPolicyArns"];
|
|
1964
2042
|
if (managedPolicyArns && Array.isArray(managedPolicyArns)) for (const policyArn of managedPolicyArns) {
|
|
@@ -1987,7 +2065,7 @@ var IAMUserGroupProvider = class {
|
|
|
1987
2065
|
log.debug(`Added inline policy ${v(policy.PolicyName)} to user ${v(userName)}`);
|
|
1988
2066
|
}
|
|
1989
2067
|
} catch (innerError) {
|
|
1990
|
-
try {
|
|
2068
|
+
if (!adopted) try {
|
|
1991
2069
|
await this.removeUserFromAllGroups(userName, log);
|
|
1992
2070
|
await this.detachAllUserPolicies(userName, log);
|
|
1993
2071
|
await this.deleteAllUserInlinePolicies(userName, log);
|
|
@@ -2015,7 +2093,7 @@ var IAMUserGroupProvider = class {
|
|
|
2015
2093
|
log.debug(`Successfully created IAM user ${logicalId}: ${v(userName)}`);
|
|
2016
2094
|
return {
|
|
2017
2095
|
physicalId: userName,
|
|
2018
|
-
attributes: { Arn:
|
|
2096
|
+
attributes: { Arn: user?.Arn }
|
|
2019
2097
|
};
|
|
2020
2098
|
} catch (error) {
|
|
2021
2099
|
const cause = error instanceof Error ? error : void 0;
|
|
@@ -2342,10 +2420,32 @@ var IAMUserGroupProvider = class {
|
|
|
2342
2420
|
try {
|
|
2343
2421
|
const createParams = { GroupName: groupName };
|
|
2344
2422
|
if (properties["Path"]) createParams.Path = properties["Path"];
|
|
2345
|
-
const
|
|
2423
|
+
const createClient = await this.createClient.get();
|
|
2424
|
+
let group;
|
|
2425
|
+
let adopted = false;
|
|
2426
|
+
try {
|
|
2427
|
+
group = (await createClient.send(new CreateGroupCommand(createParams))).Group;
|
|
2428
|
+
} catch (createError) {
|
|
2429
|
+
group = await iamEntityLeftByThisCreate({
|
|
2430
|
+
logicalId,
|
|
2431
|
+
resourceType,
|
|
2432
|
+
noun: "group",
|
|
2433
|
+
displayName: groupName,
|
|
2434
|
+
createError,
|
|
2435
|
+
namesThisEntity: (reported) => reported === groupName,
|
|
2436
|
+
read: async () => (await this.iamClient.send(new GetGroupCommand({
|
|
2437
|
+
GroupName: groupName,
|
|
2438
|
+
MaxItems: 1
|
|
2439
|
+
}))).Group,
|
|
2440
|
+
identityOf: (live) => userOrGroupIdentityToken(live?.GroupId),
|
|
2441
|
+
log
|
|
2442
|
+
});
|
|
2443
|
+
if (group === void 0) throw createError;
|
|
2444
|
+
adopted = true;
|
|
2445
|
+
}
|
|
2346
2446
|
leftBehind = true;
|
|
2347
|
-
createdGroupIdentity = userOrGroupIdentityToken(
|
|
2348
|
-
reportCreatedResource(logicalId, resourceType, groupName, createdGroupIdentity);
|
|
2447
|
+
createdGroupIdentity = userOrGroupIdentityToken(group?.GroupId);
|
|
2448
|
+
if (!adopted) reportCreatedResource(logicalId, resourceType, groupName, createdGroupIdentity);
|
|
2349
2449
|
try {
|
|
2350
2450
|
const managedPolicyArns = properties["ManagedPolicyArns"];
|
|
2351
2451
|
if (managedPolicyArns && Array.isArray(managedPolicyArns)) for (const policyArn of managedPolicyArns) {
|
|
@@ -2366,7 +2466,7 @@ var IAMUserGroupProvider = class {
|
|
|
2366
2466
|
log.debug(`Added inline policy ${v(policy.PolicyName)} to group ${v(groupName)}`);
|
|
2367
2467
|
}
|
|
2368
2468
|
} catch (innerError) {
|
|
2369
|
-
try {
|
|
2469
|
+
if (!adopted) try {
|
|
2370
2470
|
await this.detachAllGroupPolicies(groupName, log);
|
|
2371
2471
|
await this.deleteAllGroupInlinePolicies(groupName, log);
|
|
2372
2472
|
await this.iamClient.send(new DeleteGroupCommand({ GroupName: groupName }));
|
|
@@ -2383,7 +2483,7 @@ var IAMUserGroupProvider = class {
|
|
|
2383
2483
|
log.debug(`Successfully created IAM group ${logicalId}: ${v(groupName)}`);
|
|
2384
2484
|
return {
|
|
2385
2485
|
physicalId: groupName,
|
|
2386
|
-
attributes: { Arn:
|
|
2486
|
+
attributes: { Arn: group?.Arn }
|
|
2387
2487
|
};
|
|
2388
2488
|
} catch (error) {
|
|
2389
2489
|
const cause = error instanceof Error ? error : void 0;
|
|
@@ -17302,6 +17402,7 @@ function routeTargetParams(properties) {
|
|
|
17302
17402
|
EgressOnlyInternetGatewayId: properties["EgressOnlyInternetGatewayId"] ?? void 0,
|
|
17303
17403
|
InstanceId: properties["InstanceId"] ?? void 0,
|
|
17304
17404
|
NetworkInterfaceId: properties["NetworkInterfaceId"] ?? void 0,
|
|
17405
|
+
OdbNetworkArn: properties["OdbNetworkArn"] ?? void 0,
|
|
17305
17406
|
TransitGatewayId: properties["TransitGatewayId"] ?? void 0,
|
|
17306
17407
|
VpcEndpointId: properties["VpcEndpointId"] ?? void 0,
|
|
17307
17408
|
VpcPeeringConnectionId: properties["VpcPeeringConnectionId"] ?? void 0
|
|
@@ -17623,6 +17724,7 @@ var EC2Provider = class {
|
|
|
17623
17724
|
"EgressOnlyInternetGatewayId",
|
|
17624
17725
|
"InstanceId",
|
|
17625
17726
|
"NetworkInterfaceId",
|
|
17727
|
+
"OdbNetworkArn",
|
|
17626
17728
|
"TransitGatewayId",
|
|
17627
17729
|
"VpcEndpointId",
|
|
17628
17730
|
"VpcPeeringConnectionId"
|
|
@@ -21328,6 +21430,7 @@ var EC2Provider = class {
|
|
|
21328
21430
|
if (route.LocalGatewayId !== void 0) result["LocalGatewayId"] = route.LocalGatewayId;
|
|
21329
21431
|
if (route.CarrierGatewayId !== void 0) result["CarrierGatewayId"] = route.CarrierGatewayId;
|
|
21330
21432
|
if (route.CoreNetworkArn !== void 0) result["CoreNetworkArn"] = route.CoreNetworkArn;
|
|
21433
|
+
if (route.OdbNetworkArn !== void 0) result["OdbNetworkArn"] = route.OdbNetworkArn;
|
|
21331
21434
|
return result;
|
|
21332
21435
|
}
|
|
21333
21436
|
async readSubnetRouteTableAssociationCurrentState(physicalId) {
|
|
@@ -27126,6 +27229,10 @@ function isEcsErrorNamed(error, names) {
|
|
|
27126
27229
|
return typeof name === "string" && names.includes(name);
|
|
27127
27230
|
}
|
|
27128
27231
|
const settleRolloutDelays = { sleep: (ms) => new Promise((resolve) => setTimeout(resolve, ms)) };
|
|
27232
|
+
const serviceInactiveWait = {
|
|
27233
|
+
sleep: (ms) => new Promise((resolve) => setTimeout(resolve, ms)),
|
|
27234
|
+
now: () => Date.now()
|
|
27235
|
+
};
|
|
27129
27236
|
function requestedRolloutOf(service) {
|
|
27130
27237
|
if (!service) return void 0;
|
|
27131
27238
|
const primary = service.deployments?.find((d) => d.status === "PRIMARY");
|
|
@@ -27183,6 +27290,23 @@ function rolloutSupersededBy(requested, settled) {
|
|
|
27183
27290
|
function markNotGoneOnNotFoundClass$1(error, wrapped) {
|
|
27184
27291
|
return error instanceof Error && error.name.includes("NotFound") ? markNotGone(wrapped) : wrapped;
|
|
27185
27292
|
}
|
|
27293
|
+
function gatewayConnectorsGateKey(value) {
|
|
27294
|
+
if (!Array.isArray(value)) return JSON.stringify(value ?? null);
|
|
27295
|
+
return JSON.stringify(value.map((connector) => {
|
|
27296
|
+
if (typeof connector !== "object" || connector === null || Array.isArray(connector)) return connector;
|
|
27297
|
+
const filters = connector["Filters"];
|
|
27298
|
+
if (typeof filters !== "object" || filters === null || Array.isArray(filters)) return connector;
|
|
27299
|
+
const accessTypes = filters["AccessTypes"];
|
|
27300
|
+
if (!Array.isArray(accessTypes)) return connector;
|
|
27301
|
+
return {
|
|
27302
|
+
...connector,
|
|
27303
|
+
Filters: {
|
|
27304
|
+
...filters,
|
|
27305
|
+
AccessTypes: accessTypes.map((v) => JSON.stringify(v) ?? "undefined").sort()
|
|
27306
|
+
}
|
|
27307
|
+
};
|
|
27308
|
+
}));
|
|
27309
|
+
}
|
|
27186
27310
|
var ECSProvider = class {
|
|
27187
27311
|
ecsClient;
|
|
27188
27312
|
taskDefinitionCreateClient;
|
|
@@ -27245,7 +27369,8 @@ var ECSProvider = class {
|
|
|
27245
27369
|
"Role",
|
|
27246
27370
|
"ServiceConnectConfiguration",
|
|
27247
27371
|
"VolumeConfigurations",
|
|
27248
|
-
"VpcLatticeConfigurations"
|
|
27372
|
+
"VpcLatticeConfigurations",
|
|
27373
|
+
"GatewayConnectors"
|
|
27249
27374
|
])]
|
|
27250
27375
|
]);
|
|
27251
27376
|
unhandledByDesign = /* @__PURE__ */ new Map([["AWS::ECS::TaskDefinition", /* @__PURE__ */ new Map([["InferenceAccelerators", "AWS Elastic Inference end-of-life 2024-04; use AWS Inferentia / Trainium accelerator instance families instead"]])]]);
|
|
@@ -27601,7 +27726,8 @@ var ECSProvider = class {
|
|
|
27601
27726
|
serviceConnectConfiguration: this.convertServiceConnectConfiguration(properties["ServiceConnectConfiguration"]),
|
|
27602
27727
|
volumeConfigurations: this.convertServiceVolumeConfigurations(properties["VolumeConfigurations"]),
|
|
27603
27728
|
vpcLatticeConfigurations: this.convertVpcLatticeConfigurations(properties["VpcLatticeConfigurations"]),
|
|
27604
|
-
monitoring: this.convertMonitoringConfiguration(properties["Monitoring"])
|
|
27729
|
+
monitoring: this.convertMonitoringConfiguration(properties["Monitoring"]),
|
|
27730
|
+
gatewayConnectors: this.convertGatewayConnectors(properties["GatewayConnectors"])
|
|
27605
27731
|
}))).service;
|
|
27606
27732
|
if (!service || !service.serviceArn) throw new Error("CreateService did not return service ARN");
|
|
27607
27733
|
log.debug(`Successfully created ECS service ${logicalId}: ${service.serviceArn}`);
|
|
@@ -27808,6 +27934,7 @@ var ECSProvider = class {
|
|
|
27808
27934
|
const volumeConfigurationsInput = JSON.stringify(previousProperties["VolumeConfigurations"] ?? null) !== JSON.stringify(properties["VolumeConfigurations"] ?? null) ? clearOnUpdateRemoval(this.convertServiceVolumeConfigurations(properties["VolumeConfigurations"]), previousProperties["VolumeConfigurations"], []) : void 0;
|
|
27809
27935
|
const vpcLatticeConfigurationsInput = JSON.stringify(previousProperties["VpcLatticeConfigurations"] ?? null) !== JSON.stringify(properties["VpcLatticeConfigurations"] ?? null) ? clearOnUpdateRemoval(this.convertVpcLatticeConfigurations(properties["VpcLatticeConfigurations"]), previousProperties["VpcLatticeConfigurations"], []) : void 0;
|
|
27810
27936
|
const monitoringInput = JSON.stringify(previousProperties["Monitoring"] ?? null) !== JSON.stringify(properties["Monitoring"] ?? null) ? clearOnUpdateRemoval(this.convertMonitoringConfiguration(properties["Monitoring"]), previousProperties["Monitoring"], { metricConfigurations: [] }) : void 0;
|
|
27937
|
+
const gatewayConnectorsInput = gatewayConnectorsGateKey(previousProperties["GatewayConnectors"]) !== gatewayConnectorsGateKey(properties["GatewayConnectors"]) ? this.convertGatewayConnectors(properties["GatewayConnectors"]) : void 0;
|
|
27811
27938
|
const forceNewDeploymentInput = this.resolveForceNewDeployment(properties, previousProperties, log);
|
|
27812
27939
|
const deploymentConfigurationInput = this.resolveDeploymentConfiguration(properties, previousProperties);
|
|
27813
27940
|
try {
|
|
@@ -27834,6 +27961,7 @@ var ECSProvider = class {
|
|
|
27834
27961
|
volumeConfigurations: volumeConfigurationsInput,
|
|
27835
27962
|
vpcLatticeConfigurations: vpcLatticeConfigurationsInput,
|
|
27836
27963
|
monitoring: monitoringInput,
|
|
27964
|
+
gatewayConnectors: gatewayConnectorsInput,
|
|
27837
27965
|
forceNewDeployment: forceNewDeploymentInput
|
|
27838
27966
|
}))).service;
|
|
27839
27967
|
if (service?.serviceArn) await this.applyTagDiff(service.serviceArn, resourceType, logicalId, previousProperties["Tags"], properties["Tags"], log);
|
|
@@ -27869,6 +27997,7 @@ var ECSProvider = class {
|
|
|
27869
27997
|
}
|
|
27870
27998
|
} else cluster = recordedCluster;
|
|
27871
27999
|
let stripped = false;
|
|
28000
|
+
let alreadyDeleted = false;
|
|
27872
28001
|
try {
|
|
27873
28002
|
try {
|
|
27874
28003
|
await client.send(new UpdateServiceCommand({
|
|
@@ -27884,27 +28013,57 @@ var ECSProvider = class {
|
|
|
27884
28013
|
const clientRegion = await client.config.region();
|
|
27885
28014
|
assertRegionMatch(clientRegion, context?.expectedRegion, resourceType, logicalId, physicalId);
|
|
27886
28015
|
this.logger.debug(`ECS service ${physicalId} not found during scale down, skipping deletion`);
|
|
27887
|
-
return;
|
|
27888
|
-
|
|
27889
|
-
throw error;
|
|
28016
|
+
if (!this.isServiceNotActiveException(error)) return;
|
|
28017
|
+
alreadyDeleted = true;
|
|
28018
|
+
} else throw error;
|
|
28019
|
+
}
|
|
28020
|
+
if (!alreadyDeleted) {
|
|
28021
|
+
await client.send(new DeleteServiceCommand({
|
|
28022
|
+
cluster,
|
|
28023
|
+
service: physicalId,
|
|
28024
|
+
force: true
|
|
28025
|
+
}));
|
|
28026
|
+
this.logger.debug(`Successfully deleted ECS service ${logicalId}`);
|
|
27890
28027
|
}
|
|
27891
|
-
await client.send(new DeleteServiceCommand({
|
|
27892
|
-
cluster,
|
|
27893
|
-
service: physicalId,
|
|
27894
|
-
force: true
|
|
27895
|
-
}));
|
|
27896
|
-
this.logger.debug(`Successfully deleted ECS service ${logicalId}`);
|
|
27897
28028
|
} catch (error) {
|
|
27898
28029
|
if (this.isServiceNotFoundException(error)) {
|
|
27899
28030
|
const clientRegion = await client.config.region();
|
|
27900
28031
|
assertRegionMatch(clientRegion, context?.expectedRegion, resourceType, logicalId, physicalId);
|
|
27901
28032
|
this.logger.debug(`ECS service ${physicalId} not found, skipping deletion`);
|
|
27902
|
-
return;
|
|
28033
|
+
if (!this.isServiceNotActiveException(error)) return;
|
|
28034
|
+
} else {
|
|
28035
|
+
const cause = error instanceof Error ? error : void 0;
|
|
28036
|
+
const wrapped = this.wrapCaughtError(maskerOrIdentity(context?.maskSecrets), error, (text) => new ProvisioningError(`Failed to delete ECS service ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
|
|
28037
|
+
const failure = this.isClusterNotFoundException(error) ? wrapped : markNotGoneOnNotFoundClass$1(error, wrapped);
|
|
28038
|
+
throw stripped ? markDeleteStarted(failure) : failure;
|
|
27903
28039
|
}
|
|
27904
|
-
|
|
27905
|
-
|
|
27906
|
-
|
|
27907
|
-
|
|
28040
|
+
}
|
|
28041
|
+
await this.waitForServiceInactive(logicalId, physicalId, cluster, resourceType);
|
|
28042
|
+
}
|
|
28043
|
+
async waitForServiceInactive(logicalId, physicalId, cluster, resourceType) {
|
|
28044
|
+
const client = this.getClient();
|
|
28045
|
+
const maxWaitSeconds = Math.max(600, (resolvedResourceTimeoutMs("AWS::ECS::Service") ?? 0) / 1e3);
|
|
28046
|
+
const deadline = serviceInactiveWait.now() + maxWaitSeconds * 1e3;
|
|
28047
|
+
let delay = 2e3;
|
|
28048
|
+
let lastStatus = "unknown";
|
|
28049
|
+
for (;;) {
|
|
28050
|
+
try {
|
|
28051
|
+
const out = await client.send(new DescribeServicesCommand({
|
|
28052
|
+
cluster,
|
|
28053
|
+
services: [physicalId]
|
|
28054
|
+
}));
|
|
28055
|
+
if ((out?.failures ?? []).some((failure) => failure.reason === "MISSING")) return;
|
|
28056
|
+
const status = out?.services?.[0]?.status;
|
|
28057
|
+
if (status === "INACTIVE") return;
|
|
28058
|
+
lastStatus = status ?? "unknown";
|
|
28059
|
+
} catch (error) {
|
|
28060
|
+
if (this.isClusterNotFoundException(error)) return;
|
|
28061
|
+
const readFailure = new ProvisioningError(`Failed to confirm ECS service ${logicalId} deletion: ${error instanceof Error ? error.name : "unknown error"}`, resourceType, logicalId, physicalId, error instanceof Error ? error : void 0);
|
|
28062
|
+
throw markDeleteStarted(readFailure);
|
|
28063
|
+
}
|
|
28064
|
+
if (serviceInactiveWait.now() >= deadline) throw markNonRetryable(markDeleteStarted(new ProvisioningError(`ECS service ${logicalIdShown(logicalId)} was deleted but did not reach INACTIVE within ${maxWaitSeconds}s (last status: ${lastStatus}). Re-run once the service is INACTIVE, or raise the limit with --resource-timeout AWS::ECS::Service=${commandHole("duration")}.`, resourceType, logicalId, physicalId)));
|
|
28065
|
+
await serviceInactiveWait.sleep(delay);
|
|
28066
|
+
delay = Math.min(delay * 2, 1e4);
|
|
27908
28067
|
}
|
|
27909
28068
|
}
|
|
27910
28069
|
async getServiceAttribute(physicalId, attributeName) {
|
|
@@ -28377,6 +28536,10 @@ var ECSProvider = class {
|
|
|
28377
28536
|
if (!items) return void 0;
|
|
28378
28537
|
return pascalToCamelCaseKeys(items);
|
|
28379
28538
|
}
|
|
28539
|
+
convertGatewayConnectors(items) {
|
|
28540
|
+
if (!items) return void 0;
|
|
28541
|
+
return pascalToCamelCaseKeys(items);
|
|
28542
|
+
}
|
|
28380
28543
|
convertMonitoringConfiguration(config) {
|
|
28381
28544
|
if (!config) return void 0;
|
|
28382
28545
|
return pascalToCamelCaseKeys(config);
|
|
@@ -28446,6 +28609,9 @@ var ECSProvider = class {
|
|
|
28446
28609
|
if (error instanceof Error) return error.name === "ServiceNotFoundException" || error.name === "ServiceNotActiveException" || error.message.includes("service not found") || error.message.includes("Service not found");
|
|
28447
28610
|
return false;
|
|
28448
28611
|
}
|
|
28612
|
+
isServiceNotActiveException(error) {
|
|
28613
|
+
return error instanceof Error && error.name === "ServiceNotActiveException";
|
|
28614
|
+
}
|
|
28449
28615
|
getDriftUnknownPaths(resourceType) {
|
|
28450
28616
|
if (resourceType === "AWS::ECS::Service") return [
|
|
28451
28617
|
"ServiceConnectConfiguration",
|
|
@@ -28453,7 +28619,8 @@ var ECSProvider = class {
|
|
|
28453
28619
|
"VpcLatticeConfigurations",
|
|
28454
28620
|
"Monitoring",
|
|
28455
28621
|
"ForceNewDeployment",
|
|
28456
|
-
"Role"
|
|
28622
|
+
"Role",
|
|
28623
|
+
"GatewayConnectors"
|
|
28457
28624
|
];
|
|
28458
28625
|
return [];
|
|
28459
28626
|
}
|
|
@@ -32854,6 +33021,10 @@ const VPCS_KEPT_ON_REMOVAL_NOTE = "A private hosted zone stays private and keeps
|
|
|
32854
33021
|
function declaresNoVpcs(vpcs) {
|
|
32855
33022
|
return vpcs == null || Array.isArray(vpcs) && vpcs.length === 0;
|
|
32856
33023
|
}
|
|
33024
|
+
function declaredVpcIds(vpcs) {
|
|
33025
|
+
if (!Array.isArray(vpcs)) return [];
|
|
33026
|
+
return vpcs.map((vpc) => vpc?.["VPCId"]);
|
|
33027
|
+
}
|
|
32857
33028
|
function sentence$1(text) {
|
|
32858
33029
|
return text.endsWith(".") ? text : `${text}.`;
|
|
32859
33030
|
}
|
|
@@ -33020,7 +33191,7 @@ var Route53Provider = class {
|
|
|
33020
33191
|
}));
|
|
33021
33192
|
}
|
|
33022
33193
|
await this.applyHostedZoneTags(zoneId, properties, logicalId, void 0, mask);
|
|
33023
|
-
await this.applyQueryLoggingConfig(zoneId, properties, logicalId);
|
|
33194
|
+
await this.applyQueryLoggingConfig(zoneId, properties, logicalId, void 0, mask);
|
|
33024
33195
|
if (declaresAcceleratedRecovery(properties)) {
|
|
33025
33196
|
try {
|
|
33026
33197
|
await this.getClient().send(new UpdateHostedZoneFeaturesCommand({
|
|
@@ -33120,8 +33291,8 @@ var Route53Provider = class {
|
|
|
33120
33291
|
Comment: comment
|
|
33121
33292
|
}));
|
|
33122
33293
|
await this.applyHostedZoneTags(physicalId, properties, logicalId, previousProperties, mask);
|
|
33123
|
-
await this.applyQueryLoggingConfig(physicalId, properties, logicalId, previousProperties);
|
|
33124
|
-
await this.syncVPCAssociations(physicalId, properties, logicalId);
|
|
33294
|
+
await this.applyQueryLoggingConfig(physicalId, properties, logicalId, previousProperties, mask, context?.markUnsettled);
|
|
33295
|
+
await this.syncVPCAssociations(physicalId, properties, logicalId, previousProperties, mask, context);
|
|
33125
33296
|
const prevEnabled = declaresAcceleratedRecovery(previousProperties, true);
|
|
33126
33297
|
const nextEnabled = declaresAcceleratedRecovery(properties, context?.desiredFromAwsReadback === true);
|
|
33127
33298
|
if (prevEnabled !== nextEnabled) {
|
|
@@ -33133,7 +33304,7 @@ var Route53Provider = class {
|
|
|
33133
33304
|
}
|
|
33134
33305
|
const nameServers = (await this.getClient().send(new GetHostedZoneCommand({ Id: physicalId }))).DelegationSet?.NameServers ?? [];
|
|
33135
33306
|
this.logger.debug(`Successfully updated hosted zone ${logicalId}`);
|
|
33136
|
-
if (context?.desiredFromAwsReadback !== true && declaresNoVpcs(properties["VPCs"]) && Array.isArray(previousProperties["VPCs"]) && previousProperties["VPCs"].length > 0) this.logger.warn(context?.replayingState ? safeMsg`${logicalId} (AWS::Route53::HostedZone): VPCs is absent from the state being restored, so the rollback leaves the zone's VPC associations in place. ${VPCS_KEPT_ON_REMOVAL_NOTE}` : safeMsg`${logicalId} (AWS::Route53::HostedZone): VPCs was removed from the template, and the zone keeps its current VPC associations, as CloudFormation leaves them. ${VPCS_KEPT_ON_REMOVAL_NOTE}`);
|
|
33307
|
+
if (context?.desiredFromAwsReadback !== true && declaresNoVpcs(properties["VPCs"]) && (Array.isArray(previousProperties["VPCs"]) && previousProperties["VPCs"].length > 0 || context?.unsettledProperties?.has("VPCs") === true)) this.logger.warn(context?.replayingState ? safeMsg`${logicalId} (AWS::Route53::HostedZone): VPCs is absent from the state being restored, so the rollback leaves the zone's VPC associations in place. ${VPCS_KEPT_ON_REMOVAL_NOTE}` : safeMsg`${logicalId} (AWS::Route53::HostedZone): VPCs was removed from the template, and the zone keeps its current VPC associations, as CloudFormation leaves them. ${VPCS_KEPT_ON_REMOVAL_NOTE}`);
|
|
33137
33308
|
return {
|
|
33138
33309
|
physicalId,
|
|
33139
33310
|
wasReplaced: false,
|
|
@@ -33539,7 +33710,7 @@ var Route53Provider = class {
|
|
|
33539
33710
|
return typeof entry.Key === "string" && typeof entry.Value === "string";
|
|
33540
33711
|
});
|
|
33541
33712
|
}
|
|
33542
|
-
async applyQueryLoggingConfig(zoneId, properties, logicalId, previousProperties) {
|
|
33713
|
+
async applyQueryLoggingConfig(zoneId, properties, logicalId, previousProperties, mask, markUnsettled) {
|
|
33543
33714
|
const cloudWatchLogsLogGroupArn = this.readQueryLogGroupArn(properties);
|
|
33544
33715
|
const desiredBlock = properties["QueryLoggingConfig"];
|
|
33545
33716
|
const desiredBlockIsObject = typeof desiredBlock === "object" && desiredBlock !== null && !Array.isArray(desiredBlock);
|
|
@@ -33551,13 +33722,16 @@ var Route53Provider = class {
|
|
|
33551
33722
|
if (cloudWatchLogsLogGroupArn === void 0) {
|
|
33552
33723
|
if (previousProperties !== void 0 && this.readQueryLogGroupArn(previousProperties)) {
|
|
33553
33724
|
this.logger.debug(`QueryLoggingConfig removed from template for hosted zone ${logicalId}; deleting the live config`);
|
|
33725
|
+
markUnsettled?.("QueryLoggingConfig");
|
|
33554
33726
|
await this.deleteQueryLoggingConfigForZone(zoneId, logicalId);
|
|
33555
33727
|
const remaining = await this.listQueryLoggingConfigIds(zoneId);
|
|
33556
33728
|
if (remaining.length > 0) throw new ProvisioningError(`QueryLoggingConfig was removed from the template for hosted zone ${logicalId} but the live config (${remaining.join(", ")}) is still present. The removal will NOT be retried on the next deploy (state no longer records the property), so it is reported instead of ignored.`, "AWS::Route53::HostedZone", logicalId, zoneId);
|
|
33557
33729
|
}
|
|
33558
33730
|
return;
|
|
33559
33731
|
}
|
|
33732
|
+
if (previousProperties !== void 0 && this.readQueryLogGroupArn(previousProperties) === cloudWatchLogsLogGroupArn) return;
|
|
33560
33733
|
try {
|
|
33734
|
+
markUnsettled?.("QueryLoggingConfig");
|
|
33561
33735
|
await this.deleteQueryLoggingConfigForZone(zoneId, logicalId);
|
|
33562
33736
|
await this.getClient().send(new CreateQueryLoggingConfigCommand({
|
|
33563
33737
|
HostedZoneId: zoneId,
|
|
@@ -33565,11 +33739,12 @@ var Route53Provider = class {
|
|
|
33565
33739
|
}));
|
|
33566
33740
|
this.logger.debug(`Applied query logging config to hosted zone ${logicalId}`);
|
|
33567
33741
|
} catch (error) {
|
|
33568
|
-
if (error instanceof Error && error.name === "QueryLoggingConfigAlreadyExists") {
|
|
33742
|
+
if (previousProperties === void 0 && error instanceof Error && error.name === "QueryLoggingConfigAlreadyExists") {
|
|
33569
33743
|
this.logger.debug(`Query logging config already exists for hosted zone ${logicalId}`);
|
|
33570
33744
|
return;
|
|
33571
33745
|
}
|
|
33572
|
-
|
|
33746
|
+
const cause = error instanceof Error ? error : void 0;
|
|
33747
|
+
throw this.wrapCaughtError(mask, error, (text) => new ProvisioningError(`Failed to apply query logging config to hosted zone ${logicalId}: ${text}`, "AWS::Route53::HostedZone", logicalId, zoneId, cause));
|
|
33573
33748
|
}
|
|
33574
33749
|
}
|
|
33575
33750
|
readQueryLogGroupArn(properties) {
|
|
@@ -33605,7 +33780,7 @@ var Route53Provider = class {
|
|
|
33605
33780
|
this.logger.warn(`Failed to delete query logging config for hosted zone ${logicalId}: ${describeAwsFailure(error).detail}`);
|
|
33606
33781
|
}
|
|
33607
33782
|
}
|
|
33608
|
-
async syncVPCAssociations(zoneId, properties, logicalId) {
|
|
33783
|
+
async syncVPCAssociations(zoneId, properties, logicalId, previousProperties, mask, marks) {
|
|
33609
33784
|
const desiredVpcs = properties["VPCs"];
|
|
33610
33785
|
if (!desiredVpcs || desiredVpcs.length === 0) return;
|
|
33611
33786
|
try {
|
|
@@ -33616,6 +33791,7 @@ var Route53Provider = class {
|
|
|
33616
33791
|
const vpcId = vpc["VPCId"];
|
|
33617
33792
|
if (!currentVpcIds.has(vpcId)) {
|
|
33618
33793
|
this.logger.debug(`Associating VPC ${vpcId} with hosted zone ${zoneId}`);
|
|
33794
|
+
marks?.markUnsettled?.("VPCs");
|
|
33619
33795
|
await this.getClient().send(new AssociateVPCWithHostedZoneCommand({
|
|
33620
33796
|
HostedZoneId: zoneId,
|
|
33621
33797
|
VPC: {
|
|
@@ -33623,14 +33799,14 @@ var Route53Provider = class {
|
|
|
33623
33799
|
VPCRegion: vpc["VPCRegion"]
|
|
33624
33800
|
}
|
|
33625
33801
|
}));
|
|
33802
|
+
marks?.markAttempted?.("VPCs", [vpcId]);
|
|
33803
|
+
currentVpcIds.add(vpcId);
|
|
33626
33804
|
}
|
|
33627
33805
|
}
|
|
33628
|
-
|
|
33629
|
-
|
|
33630
|
-
this.logger.warn(`Cannot disassociate last VPC ${vpc.VPCId} from hosted zone ${logicalId}`);
|
|
33631
|
-
continue;
|
|
33632
|
-
}
|
|
33806
|
+
const previousVpcIds = new Set(declaredVpcIds(previousProperties["VPCs"]));
|
|
33807
|
+
for (const vpc of currentVpcs) if (vpc.VPCId && previousVpcIds.has(vpc.VPCId) && !desiredVpcIds.has(vpc.VPCId)) {
|
|
33633
33808
|
this.logger.debug(`Disassociating VPC ${vpc.VPCId} from hosted zone ${zoneId}`);
|
|
33809
|
+
marks?.markUnsettled?.("VPCs");
|
|
33634
33810
|
await this.getClient().send(new DisassociateVPCFromHostedZoneCommand({
|
|
33635
33811
|
HostedZoneId: zoneId,
|
|
33636
33812
|
VPC: {
|
|
@@ -33640,7 +33816,8 @@ var Route53Provider = class {
|
|
|
33640
33816
|
}));
|
|
33641
33817
|
}
|
|
33642
33818
|
} catch (error) {
|
|
33643
|
-
|
|
33819
|
+
const cause = error instanceof Error ? error : void 0;
|
|
33820
|
+
throw this.wrapCaughtError(mask, error, (text) => new ProvisioningError(`Failed to sync VPC associations for hosted zone ${logicalId}: ${text}`, "AWS::Route53::HostedZone", logicalId, zoneId, cause));
|
|
33644
33821
|
}
|
|
33645
33822
|
}
|
|
33646
33823
|
async resolveHostedZoneId(properties, logicalId, resourceType, physicalId, options) {
|
|
@@ -33718,7 +33895,27 @@ var Route53Provider = class {
|
|
|
33718
33895
|
default: return;
|
|
33719
33896
|
}
|
|
33720
33897
|
}
|
|
33721
|
-
async
|
|
33898
|
+
async readUnsettled(physicalId, logicalId, resourceType, names, recordedProperties, desiredProperties, attemptedItems) {
|
|
33899
|
+
if (resourceType !== "AWS::Route53::HostedZone") return this.readCurrentState(physicalId, logicalId, resourceType, recordedProperties);
|
|
33900
|
+
const live = await this.readHostedZone(physicalId, recordedProperties, names.has("QueryLoggingConfig"));
|
|
33901
|
+
if (live === void 0 || live === RESOURCE_NOT_FOUND) return live;
|
|
33902
|
+
if (!names.has("VPCs") || !Array.isArray(live["VPCs"])) return live;
|
|
33903
|
+
const { VPCs: liveVpcs, ...rest } = live;
|
|
33904
|
+
if (declaresNoVpcs(desiredProperties?.["VPCs"])) return rest;
|
|
33905
|
+
const named = /* @__PURE__ */ new Set([
|
|
33906
|
+
...declaredVpcIds(recordedProperties?.["VPCs"]),
|
|
33907
|
+
...declaredVpcIds(desiredProperties?.["VPCs"]),
|
|
33908
|
+
...[...attemptedItems?.get("VPCs") ?? []].filter(isUsableAttemptedName)
|
|
33909
|
+
]);
|
|
33910
|
+
return {
|
|
33911
|
+
...rest,
|
|
33912
|
+
VPCs: liveVpcs.filter((vpc) => named.has(vpc["VPCId"]))
|
|
33913
|
+
};
|
|
33914
|
+
}
|
|
33915
|
+
getDriftUnorderedPaths(resourceType) {
|
|
33916
|
+
return resourceType === "AWS::Route53::HostedZone" ? ["VPCs"] : [];
|
|
33917
|
+
}
|
|
33918
|
+
async readHostedZone(physicalId, properties, throwOnFailedQueryLoggingRead = false) {
|
|
33722
33919
|
let resp;
|
|
33723
33920
|
try {
|
|
33724
33921
|
resp = await this.getClient().send(new GetHostedZoneCommand({ Id: physicalId }));
|
|
@@ -33762,6 +33959,7 @@ var Route53Provider = class {
|
|
|
33762
33959
|
else result["QueryLoggingConfig"] = {};
|
|
33763
33960
|
} catch (err) {
|
|
33764
33961
|
this.logger.debug(`Route53 ListQueryLoggingConfigs(${idTail}) failed: ${describeAwsFailure(err).detail}`);
|
|
33962
|
+
if (throwOnFailedQueryLoggingRead) throw err;
|
|
33765
33963
|
result["QueryLoggingConfig"] = {};
|
|
33766
33964
|
}
|
|
33767
33965
|
return result;
|
|
@@ -48437,7 +48635,8 @@ var FirehoseProvider = class {
|
|
|
48437
48635
|
"SplunkDestinationConfiguration",
|
|
48438
48636
|
"AmazonOpenSearchServerlessDestinationConfiguration",
|
|
48439
48637
|
"DeliveryStreamEncryptionConfigurationInput",
|
|
48440
|
-
"IcebergDestinationConfiguration"
|
|
48638
|
+
"IcebergDestinationConfiguration",
|
|
48639
|
+
"MSKSourceConfiguration"
|
|
48441
48640
|
])]]);
|
|
48442
48641
|
getClient() {
|
|
48443
48642
|
if (!this.client) {
|
|
@@ -48461,12 +48660,14 @@ var FirehoseProvider = class {
|
|
|
48461
48660
|
const deliveryStreamName = properties["DeliveryStreamName"];
|
|
48462
48661
|
const deliveryStreamType = properties["DeliveryStreamType"] || "DirectPut";
|
|
48463
48662
|
if (!isReadableTagList(properties["Tags"])) throw markNonRetryable(new ProvisioningError(`Tags of Firehose delivery stream ${logicalId} is not a list of tags with a Key — the delivery stream was not created`, resourceType, logicalId));
|
|
48663
|
+
const mskSource = properties["MSKSourceConfiguration"] === void 0 ? void 0 : mapMskSourceConfiguration(properties["MSKSourceConfiguration"], maskerOrIdentity(context?.maskSecrets), resourceType, logicalId);
|
|
48464
48664
|
let createdStreamName;
|
|
48465
48665
|
try {
|
|
48466
48666
|
const input = {
|
|
48467
48667
|
DeliveryStreamName: deliveryStreamName || generatedNameFor("AWS::KinesisFirehose::DeliveryStream", logicalId),
|
|
48468
48668
|
DeliveryStreamType: deliveryStreamType
|
|
48469
48669
|
};
|
|
48670
|
+
if (mskSource !== void 0) input.MSKSourceConfiguration = mskSource;
|
|
48470
48671
|
if (properties["S3DestinationConfiguration"]) {
|
|
48471
48672
|
const s3Config = properties["S3DestinationConfiguration"];
|
|
48472
48673
|
input.S3DestinationConfiguration = this.mapS3DestinationConfiguration(s3Config);
|
|
@@ -49259,7 +49460,7 @@ var FirehoseProvider = class {
|
|
|
49259
49460
|
return /* @__PURE__ */ new Set([ENCRYPTION_KEY]);
|
|
49260
49461
|
}
|
|
49261
49462
|
}
|
|
49262
|
-
async readCurrentState(physicalId, _logicalId, _resourceType) {
|
|
49463
|
+
async readCurrentState(physicalId, _logicalId, _resourceType, properties) {
|
|
49263
49464
|
let desc;
|
|
49264
49465
|
try {
|
|
49265
49466
|
desc = (await this.getClient().send(new DescribeDeliveryStreamCommand({ DeliveryStreamName: physicalId }))).DeliveryStreamDescription;
|
|
@@ -49280,6 +49481,8 @@ var FirehoseProvider = class {
|
|
|
49280
49481
|
}
|
|
49281
49482
|
const directPut = desc.Source?.DirectPutSourceDescription;
|
|
49282
49483
|
if (directPut?.ThroughputHintInMBs !== void 0) result["DirectPutSourceConfiguration"] = { ThroughputHintInMBs: directPut.ThroughputHintInMBs };
|
|
49484
|
+
const msk = desc.Source?.MSKSourceDescription;
|
|
49485
|
+
if (msk) result["MSKSourceConfiguration"] = mapMskSourceDescriptionToCfn(msk, properties?.["MSKSourceConfiguration"]);
|
|
49283
49486
|
const dest = desc.Destinations?.[0];
|
|
49284
49487
|
if (dest?.ExtendedS3DestinationDescription) result["ExtendedS3DestinationConfiguration"] = mapExtendedS3DescriptionToCfn(dest.ExtendedS3DestinationDescription);
|
|
49285
49488
|
else if (dest?.IcebergDestinationDescription) result["IcebergDestinationConfiguration"] = mapIcebergDescriptionToCfn(dest.IcebergDestinationDescription);
|
|
@@ -49445,6 +49648,47 @@ function mapRedshiftDescriptionToCfn(desc) {
|
|
|
49445
49648
|
if (desc["S3BackupDescription"]) out["S3BackupConfiguration"] = mapS3DescriptionToCfn(desc["S3BackupDescription"]);
|
|
49446
49649
|
return out;
|
|
49447
49650
|
}
|
|
49651
|
+
const EPOCH_MILLIS = /^[+-]?\d+$/;
|
|
49652
|
+
function epochMillisTimestamp(value) {
|
|
49653
|
+
if (typeof value === "number" && Number.isSafeInteger(value)) value = String(value);
|
|
49654
|
+
if (typeof value !== "string" || !EPOCH_MILLIS.test(value)) return void 0;
|
|
49655
|
+
const date = new Date(Number(value));
|
|
49656
|
+
return Number.isNaN(date.getTime()) ? void 0 : date;
|
|
49657
|
+
}
|
|
49658
|
+
function mapMskSourceConfiguration(config, mask, resourceType, logicalId) {
|
|
49659
|
+
const auth = config["AuthenticationConfiguration"];
|
|
49660
|
+
const result = {
|
|
49661
|
+
MSKClusterARN: config["MSKClusterARN"],
|
|
49662
|
+
TopicName: config["TopicName"],
|
|
49663
|
+
AuthenticationConfiguration: auth && {
|
|
49664
|
+
RoleARN: auth["RoleARN"],
|
|
49665
|
+
Connectivity: auth["Connectivity"]
|
|
49666
|
+
}
|
|
49667
|
+
};
|
|
49668
|
+
const raw = config["ReadFromTimestamp"];
|
|
49669
|
+
if (raw !== void 0) {
|
|
49670
|
+
const parsed = epochMillisTimestamp(raw);
|
|
49671
|
+
if (parsed === void 0) throw markNonRetryable(new ProvisioningError(`MSKSourceConfiguration.ReadFromTimestamp of Firehose delivery stream ${logicalId} is not a string of epoch milliseconds: ${JSON.stringify(maskDeep(raw, mask))} — CloudFormation reads it as one and refuses any other spelling, an ISO 8601 date included; write e.g. '1767225600000' for 2026-01-01T00:00:00Z. The delivery stream was not created`, resourceType, logicalId));
|
|
49672
|
+
result.ReadFromTimestamp = parsed;
|
|
49673
|
+
}
|
|
49674
|
+
return result;
|
|
49675
|
+
}
|
|
49676
|
+
function mapMskSourceDescriptionToCfn(desc, recorded) {
|
|
49677
|
+
const out = {};
|
|
49678
|
+
if (desc.MSKClusterARN !== void 0) out["MSKClusterARN"] = desc.MSKClusterARN;
|
|
49679
|
+
if (desc.TopicName !== void 0) out["TopicName"] = desc.TopicName;
|
|
49680
|
+
const auth = desc.AuthenticationConfiguration;
|
|
49681
|
+
if (auth) out["AuthenticationConfiguration"] = {
|
|
49682
|
+
...auth.RoleARN !== void 0 && { RoleARN: auth.RoleARN },
|
|
49683
|
+
...auth.Connectivity !== void 0 && { Connectivity: auth.Connectivity }
|
|
49684
|
+
};
|
|
49685
|
+
const live = desc.ReadFromTimestamp;
|
|
49686
|
+
if (live instanceof Date && !Number.isNaN(live.getTime())) {
|
|
49687
|
+
const spelled = isPlainRecord(recorded) ? recorded["ReadFromTimestamp"] : void 0;
|
|
49688
|
+
out["ReadFromTimestamp"] = epochMillisTimestamp(spelled)?.getTime() === live.getTime() ? spelled : String(live.getTime());
|
|
49689
|
+
}
|
|
49690
|
+
return out;
|
|
49691
|
+
}
|
|
49448
49692
|
function mapIcebergDescriptionToCfn(desc) {
|
|
49449
49693
|
const out = {};
|
|
49450
49694
|
for (const k of [
|
|
@@ -54914,4 +55158,4 @@ var ACMCertificateProvider = class {
|
|
|
54914
55158
|
};
|
|
54915
55159
|
|
|
54916
55160
|
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 };
|
|
54917
|
-
//# sourceMappingURL=provider-classes-
|
|
55161
|
+
//# sourceMappingURL=provider-classes-BTOXS3cs.js.map
|