@go-to-k/cdkd 0.298.8 → 0.299.1
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-B8N6UPAH.js → asg-provider-BxW2FkQz.js} +4 -4
- package/dist/{asg-provider-B8N6UPAH.js.map → asg-provider-BxW2FkQz.js.map} +1 -1
- package/dist/{aws-client-defaults-D0q0z4dG.js → aws-client-defaults-DBXBcg0J.js} +79 -3
- package/dist/aws-client-defaults-DBXBcg0J.js.map +1 -0
- package/dist/{aws-clients-CnmtbrxD.js → aws-clients-Bj7qH5Ph.js} +2 -2
- package/dist/{aws-clients-CnmtbrxD.js.map → aws-clients-Bj7qH5Ph.js.map} +1 -1
- package/dist/cli.js +2 -2
- package/dist/{deploy-engine-HKmcD4Kn.js → deploy-engine-CZUhJ1IZ.js} +932 -207
- package/dist/deploy-engine-CZUhJ1IZ.js.map +1 -0
- package/dist/{iam-policy-targets-CwKiK9nS.js → iam-policy-targets-Pn2m0R67.js} +3 -3
- package/dist/{iam-policy-targets-CwKiK9nS.js.map → iam-policy-targets-Pn2m0R67.js.map} +1 -1
- package/dist/{iam-role-provider-BiCib2zp.js → iam-role-provider-C24I_FvR.js} +47 -7
- package/dist/iam-role-provider-C24I_FvR.js.map +1 -0
- package/dist/index.d.ts +24 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -4
- package/dist/{neptune-provider-D3Qcci3J.js → neptune-provider-D7sAjt4U.js} +4 -4
- package/dist/{neptune-provider-D3Qcci3J.js.map → neptune-provider-D7sAjt4U.js.map} +1 -1
- package/dist/{program-MMwB_CTT.js → program-w-kAH85e.js} +272 -97
- package/dist/program-w-kAH85e.js.map +1 -0
- package/dist/{provider-classes--iMwAb7q.js → provider-classes-Xrt4DIC7.js} +89 -16
- package/dist/provider-classes-Xrt4DIC7.js.map +1 -0
- package/dist/{rds-provider-BdUme0V8.js → rds-provider-Bz8JUYBp.js} +4 -4
- package/dist/{rds-provider-BdUme0V8.js.map → rds-provider-Bz8JUYBp.js.map} +1 -1
- package/dist/{version-n6UXfuUI.js → version-DMqEiJIt.js} +2 -2
- package/dist/{version-n6UXfuUI.js.map → version-DMqEiJIt.js.map} +1 -1
- package/package.json +1 -1
- package/dist/aws-client-defaults-D0q0z4dG.js.map +0 -1
- package/dist/deploy-engine-HKmcD4Kn.js.map +0 -1
- package/dist/iam-role-provider-BiCib2zp.js.map +0 -1
- package/dist/program-MMwB_CTT.js.map +0 -1
- package/dist/provider-classes--iMwAb7q.js.map +0 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { r as getAwsClients } from "./aws-clients-
|
|
1
|
+
import { r as getAwsClients } from "./aws-clients-Bj7qH5Ph.js";
|
|
2
2
|
import { F as displayStackName, I as isPasteableIdent, N as displayIdent, O as SECRET_REF_MAX_CODE_POINTS, P as displaySafe, R as plainIdentOr, a as getLogger, b as generateResourceNameWithFallback, n as isAwsAuthoredFailure, r as safeStringify, t as describeAwsFailure, y as generateResourceName, z as safeMsg } from "./aws-failure-text-DtvlUugx.js";
|
|
3
|
-
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-
|
|
4
|
-
import { s as ambientRegion } from "./aws-client-defaults-
|
|
5
|
-
import { $ as isTruthyCfnBoolean,
|
|
6
|
-
import { n as collectInlinePolicyNamesManagedBySiblings, r as IamCreateClientCache, t as IAMRoleProvider } from "./iam-role-provider-
|
|
7
|
-
import { a as canonicalizeIpProtocolValue, i as resolveSecretDerivedPrincipals, n as runDestroyForStack, o as resolvedResourceTimeoutMs, r as isResolvableSecretPrincipalList, t as canonicalizeIpv4Cidr } from "./program-
|
|
8
|
-
import { RDSProvider } from "./rds-provider-
|
|
9
|
-
import { NeptuneProvider } from "./neptune-provider-
|
|
10
|
-
import { ASGProvider } from "./asg-provider-
|
|
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-Pn2m0R67.js";
|
|
4
|
+
import { s as ambientRegion } from "./aws-client-defaults-DBXBcg0J.js";
|
|
5
|
+
import { $ as isTruthyCfnBoolean, Al as displayAssemblyPath, B as DYNAMODB_DELETE_MIN_RESOURCE_TIMEOUT_MS, Bo as passedNoEchoParametersOf, Br as reDisableInstanceApiTermination, Bt as getStackRecords, Cs as carriesSecretMask, Ct as revertNestedChildFromJournal, Do as lambdaFunctionNameForMask, Dr as unchangedBehindSecretReference, Dt as getCurrentNestedStackContext, Eo as canonicalLambdaFunctionName, Er as slowCcOperationTimeoutMs, Fr as markWaitAbandoned, G as resolveDynamoDbDeleteBudgetMs, H as compensateRemovedDeletionProtection, Ia as refuseMalformedResourcesForDestroy, J as deleteTableWithIndexBusyRetry, Ja as withheldAccountClause, K as DELETE_INDEX_WAIT_PROCEED_NOTE, Lr as ec2InstanceProtectionSite, Ml as resolveAssemblyPath, Mr as deleteSkipReason, Nr as withIndeterminateGuard, Oo as sameLambdaFunctionAddress, Ot as withNestedStackContext, Pi as passedParameterClassesOf, Pr as isWaitAbandonedError, Q as hasCdkAutoDeleteTag, Qa as withoutSilentDropProperties, Qn as earliestDefined, Rr as isTerminationProtectionPropagationError, Rt as awaitInFlightSibling, To as withRetry, U as deleteBudgetKey, V as beginDeleteWait, Vi as accountArgs, Vr as reEnableInstanceApiTermination, W as resolveDynamoDbDeleteBudgetClock, X as ECR_AUTO_DELETE_IMAGES_TAG, Xa as findSilentDropProperties, Y as waitForIndexesSettled, Z as S3_AUTO_DELETE_OBJECTS_TAG, _o as readConfigString, a as findNestedTemplateTreeDefect, an as isRedactedRecordedValue, ar as planTagDiff, as as recordReferenceProvenanceEntry, b as lookupEachName, bo as requireConfigObject, br as getCurrentResourceSecrets, bs as recordAttributeIdCopy, bt as getNestedRevertRun, c as renderNestedTemplateTreeDefect, cc as stringifyValue, co as coerceWarmThroughput$1, cr as tagMapAsList, di as s3BucketDualStackDomainName, do as toFiniteNumber, dr as stringifyIfAssigned, er as reserveStackCreateToken, et as getPriorAttempts, fi as s3BucketRegionalDomainName, fo as coerceCfnBoolean, fs as dynamicReferenceTokens, ga as refuseMalformedNestedChildOutputs, go as configStringRefusal, hl as decodeListingKey, ho as configIntegerRefusal, ii as isSettledInstanceState, in as REDACTED_DELETE_ADDRESS_SKIP_REASON, ir as DBPROXY_TAG_OPTIONS, is as markSameGenerationBag, ji as parseWebACLArn, jl as renderAssemblyPathEscape, kl as describeFileReadFailure, li as s3BucketArn, lo as isWarmThroughputDecrease, lr as tagPlanWarning, mo as configBooleanRefusal, nn as getCurrentProducerRegions, nr as acquireIdempotencyToken, o as isAbsoluteAssetPath, oi as outputReferenceProvenanceOf, on as redactedDeleteAddressFields, or as readTagList, os as snapshotPassProvenance, pc as rewriteTemplateAssetReferences, pi as s3BucketWebsiteUrl, po as coerceCfnInteger, q as INDEX_SETTLE_POLL_INTERVAL_MS, qo as hasMaskableValues, rr as DBPROXY_TAGS_WHAT, s as listNestedTemplateRows, sn as redactedDeleteAddressSkip, so as WARM_THROUGHPUT_MEMBERS, sr as refuseMalformedDesiredTags, ss as redactSecretsForState, t as DeployEngine, tt as markRefusedBeforeApplying, ui as s3BucketDomainName, uo as toCfnInteger, ur as definedAttributes, us as withoutPhysicalNameCopies, v as chunks, vl as canonicalizeRegion, vo as replayWarn, vs as recoverMaskedOutput, x as withApiLimit, xi as getAccountInfo, xo as requireConfigString, y as isAccessDeniedError, yl as derivePartitionAndUrlSuffix, yo as requireConfigArray, ys as physicalNameCopiesOf, z as DynamoDBGlobalTableProvider, zr as observeThenDisableInstanceApiTermination } from "./deploy-engine-CZUhJ1IZ.js";
|
|
6
|
+
import { n as collectInlinePolicyNamesManagedBySiblings, r as IamCreateClientCache, t as IAMRoleProvider } from "./iam-role-provider-C24I_FvR.js";
|
|
7
|
+
import { a as canonicalizeIpProtocolValue, i as resolveSecretDerivedPrincipals, n as runDestroyForStack, o as resolvedResourceTimeoutMs, r as isResolvableSecretPrincipalList, t as canonicalizeIpv4Cidr } from "./program-w-kAH85e.js";
|
|
8
|
+
import { RDSProvider } from "./rds-provider-Bz8JUYBp.js";
|
|
9
|
+
import { NeptuneProvider } from "./neptune-provider-D7sAjt4U.js";
|
|
10
|
+
import { ASGProvider } from "./asg-provider-BxW2FkQz.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";
|
|
@@ -1587,6 +1587,15 @@ var IAMAccessKeyProvider = class {
|
|
|
1587
1587
|
|
|
1588
1588
|
//#endregion
|
|
1589
1589
|
//#region src/provisioning/providers/iam-user-group-provider.ts
|
|
1590
|
+
function isUserOrGroupName(resourceType, id) {
|
|
1591
|
+
return resourceType === "AWS::IAM::User" ? /^[\w+=,.@-]{1,64}$/.test(id) : /^[\w+=,.@-]{1,128}$/.test(id);
|
|
1592
|
+
}
|
|
1593
|
+
function isUserOrGroupType(resourceType) {
|
|
1594
|
+
return resourceType === "AWS::IAM::User" || resourceType === "AWS::IAM::Group";
|
|
1595
|
+
}
|
|
1596
|
+
function userOrGroupIdentityToken(id) {
|
|
1597
|
+
return typeof id === "string" && id !== "" ? id : void 0;
|
|
1598
|
+
}
|
|
1590
1599
|
const MEMBERSHIP_NO_PROPERTIES_SKIP_REASON = "no properties in state — group membership not removed";
|
|
1591
1600
|
const MEMBERSHIP_MISSING_FIELDS_SKIP_REASON = "GroupName/Users missing from state — membership not removed";
|
|
1592
1601
|
const MEMBERSHIP_MALFORMED_USERS_SKIP_REASON = "malformed Users in state — membership not removed";
|
|
@@ -1703,12 +1712,14 @@ var IAMUserGroupProvider = class {
|
|
|
1703
1712
|
const groups = readPrincipalLists({ Groups: properties["Groups"] });
|
|
1704
1713
|
if ("malformed" in groups) throw new ProvisioningError(`Groups of IAM user ${logicalId} is not a list of IAM group names — no user was created`, resourceType, logicalId);
|
|
1705
1714
|
let leftBehind = false;
|
|
1715
|
+
let createdUserIdentity;
|
|
1706
1716
|
try {
|
|
1707
1717
|
const createParams = { UserName: userName };
|
|
1708
1718
|
if (properties["Path"]) createParams.Path = properties["Path"];
|
|
1709
1719
|
if (properties["Tags"] !== void 0 && properties["Tags"] !== null) createParams.Tags = desiredTags;
|
|
1710
1720
|
const response = await (await this.createClient.get()).send(new CreateUserCommand(createParams));
|
|
1711
1721
|
leftBehind = true;
|
|
1722
|
+
createdUserIdentity = userOrGroupIdentityToken(response.User?.UserId);
|
|
1712
1723
|
try {
|
|
1713
1724
|
const permissionsBoundary = properties["PermissionsBoundary"];
|
|
1714
1725
|
if (permissionsBoundary) {
|
|
@@ -1785,7 +1796,7 @@ var IAMUserGroupProvider = class {
|
|
|
1785
1796
|
} catch (error) {
|
|
1786
1797
|
const cause = error instanceof Error ? error : void 0;
|
|
1787
1798
|
const thrown = this.wrapMaskedError(log.mask, error, (text) => new ProvisioningError(`Failed to create IAM user ${logicalId}: ${text}`, resourceType, logicalId, userName, cause));
|
|
1788
|
-
if (leftBehind) markCreatedBeforeFailure(thrown, logicalId, resourceType, userName);
|
|
1799
|
+
if (leftBehind) markCreatedBeforeFailure(thrown, logicalId, resourceType, userName, createdUserIdentity);
|
|
1789
1800
|
throw thrown;
|
|
1790
1801
|
}
|
|
1791
1802
|
}
|
|
@@ -1874,7 +1885,8 @@ var IAMUserGroupProvider = class {
|
|
|
1874
1885
|
if (error instanceof NoSuchEntityException) {
|
|
1875
1886
|
const clientRegion = await this.iamClient.config.region();
|
|
1876
1887
|
assertRegionMatch(clientRegion, context?.expectedRegion, resourceType, logicalId, physicalId);
|
|
1877
|
-
|
|
1888
|
+
if (context?.failedCreateOrphan === true) this.logger.info(safeMsg` IAM user ${physicalId} (${logicalId}), which a failed deploy created, is already gone; nothing to delete`);
|
|
1889
|
+
else log.debug(`User ${v(physicalId)} does not exist, skipping deletion`);
|
|
1878
1890
|
return;
|
|
1879
1891
|
}
|
|
1880
1892
|
throw error;
|
|
@@ -2085,11 +2097,13 @@ var IAMUserGroupProvider = class {
|
|
|
2085
2097
|
log.debug(`Creating IAM group ${logicalId}`);
|
|
2086
2098
|
const groupName = generateResourceNameWithFallback(properties["GroupName"], logicalId, { maxLength: GROUP_NAME_MAX_LENGTH });
|
|
2087
2099
|
let leftBehind = false;
|
|
2100
|
+
let createdGroupIdentity;
|
|
2088
2101
|
try {
|
|
2089
2102
|
const createParams = { GroupName: groupName };
|
|
2090
2103
|
if (properties["Path"]) createParams.Path = properties["Path"];
|
|
2091
2104
|
const response = await (await this.createClient.get()).send(new CreateGroupCommand(createParams));
|
|
2092
2105
|
leftBehind = true;
|
|
2106
|
+
createdGroupIdentity = userOrGroupIdentityToken(response.Group?.GroupId);
|
|
2093
2107
|
try {
|
|
2094
2108
|
const managedPolicyArns = properties["ManagedPolicyArns"];
|
|
2095
2109
|
if (managedPolicyArns && Array.isArray(managedPolicyArns)) for (const policyArn of managedPolicyArns) {
|
|
@@ -2130,7 +2144,7 @@ var IAMUserGroupProvider = class {
|
|
|
2130
2144
|
} catch (error) {
|
|
2131
2145
|
const cause = error instanceof Error ? error : void 0;
|
|
2132
2146
|
const thrown = this.wrapMaskedError(log.mask, error, (text) => new ProvisioningError(`Failed to create IAM group ${logicalId}: ${text}`, resourceType, logicalId, groupName, cause));
|
|
2133
|
-
if (leftBehind) markCreatedBeforeFailure(thrown, logicalId, resourceType, groupName);
|
|
2147
|
+
if (leftBehind) markCreatedBeforeFailure(thrown, logicalId, resourceType, groupName, createdGroupIdentity);
|
|
2134
2148
|
throw thrown;
|
|
2135
2149
|
}
|
|
2136
2150
|
}
|
|
@@ -2166,7 +2180,8 @@ var IAMUserGroupProvider = class {
|
|
|
2166
2180
|
if (error instanceof NoSuchEntityException) {
|
|
2167
2181
|
const clientRegion = await this.iamClient.config.region();
|
|
2168
2182
|
assertRegionMatch(clientRegion, context?.expectedRegion, resourceType, logicalId, physicalId);
|
|
2169
|
-
|
|
2183
|
+
if (context?.failedCreateOrphan === true) this.logger.info(safeMsg` IAM group ${physicalId} (${logicalId}), which a failed deploy created, is already gone; nothing to delete`);
|
|
2184
|
+
else log.debug(`Group ${v(physicalId)} does not exist, skipping deletion`);
|
|
2170
2185
|
return;
|
|
2171
2186
|
}
|
|
2172
2187
|
const cause = error instanceof Error ? error : void 0;
|
|
@@ -2448,6 +2463,50 @@ var IAMUserGroupProvider = class {
|
|
|
2448
2463
|
throw maskError(new ProvisioningError(`Failed to delete IAM UserToGroupAddition ${logicalId}: ${mask(error instanceof Error ? error.message : String(error))}`, resourceType, logicalId, physicalId, cause));
|
|
2449
2464
|
}
|
|
2450
2465
|
}
|
|
2466
|
+
async isSameResource(journaledPhysicalId, record, resourceType, context) {
|
|
2467
|
+
if (!isUserOrGroupType(resourceType)) return "unknown";
|
|
2468
|
+
if (!isUserOrGroupName(resourceType, journaledPhysicalId) || !isUserOrGroupName(resourceType, record.physicalId)) return "unknown";
|
|
2469
|
+
if (journaledPhysicalId === record.physicalId) return "same";
|
|
2470
|
+
if (journaledPhysicalId.toLowerCase() === record.physicalId.toLowerCase()) return "unknown";
|
|
2471
|
+
if (await this.iamClient.config.region() !== context.expectedRegion) return "unknown";
|
|
2472
|
+
const recordId = await this.readIdIfExists(resourceType, record.physicalId);
|
|
2473
|
+
if (recordId === void 0) return "unknown";
|
|
2474
|
+
const journaledId = await this.readIdIfExists(resourceType, journaledPhysicalId);
|
|
2475
|
+
if (journaledId === void 0) return "different";
|
|
2476
|
+
return journaledId === recordId ? "same" : "different";
|
|
2477
|
+
}
|
|
2478
|
+
async resourceIdentity(physicalId, resourceType, context) {
|
|
2479
|
+
if (!isUserOrGroupType(resourceType) || !isUserOrGroupName(resourceType, physicalId)) return;
|
|
2480
|
+
if (await this.iamClient.config.region() !== context.expectedRegion) return void 0;
|
|
2481
|
+
const id = await this.readIdIfExists(resourceType, physicalId);
|
|
2482
|
+
return id === void 0 ? RESOURCE_NOT_FOUND : id;
|
|
2483
|
+
}
|
|
2484
|
+
async readIdIfExists(resourceType, name) {
|
|
2485
|
+
let answeredName;
|
|
2486
|
+
let id;
|
|
2487
|
+
try {
|
|
2488
|
+
if (resourceType === "AWS::IAM::User") {
|
|
2489
|
+
const response = await this.iamClient.send(new GetUserCommand({ UserName: name }));
|
|
2490
|
+
answeredName = response.User?.UserName;
|
|
2491
|
+
id = response.User?.UserId;
|
|
2492
|
+
} else {
|
|
2493
|
+
const response = await this.iamClient.send(new GetGroupCommand({
|
|
2494
|
+
GroupName: name,
|
|
2495
|
+
MaxItems: 1
|
|
2496
|
+
}));
|
|
2497
|
+
answeredName = response.Group?.GroupName;
|
|
2498
|
+
id = response.Group?.GroupId;
|
|
2499
|
+
}
|
|
2500
|
+
} catch (error) {
|
|
2501
|
+
if (error instanceof NoSuchEntityException) return void 0;
|
|
2502
|
+
throw error;
|
|
2503
|
+
}
|
|
2504
|
+
const noun = resourceType === "AWS::IAM::User" ? "user" : "group";
|
|
2505
|
+
if (answeredName !== name) throw new Error(`IAM answered for another ${noun} than the one asked for`);
|
|
2506
|
+
const token = userOrGroupIdentityToken(id);
|
|
2507
|
+
if (token === void 0) throw new Error(`IAM returned no ${noun === "user" ? "UserId" : "GroupId"}`);
|
|
2508
|
+
return token;
|
|
2509
|
+
}
|
|
2451
2510
|
async readCurrentState(physicalId, logicalId, resourceType, properties, context) {
|
|
2452
2511
|
switch (resourceType) {
|
|
2453
2512
|
case "AWS::IAM::User": return this.readUserCurrentState(physicalId, properties, context);
|
|
@@ -13424,7 +13483,8 @@ var SSMParameterProvider = class SSMParameterProvider {
|
|
|
13424
13483
|
};
|
|
13425
13484
|
if (properties["AllowedPattern"]) putParams.AllowedPattern = properties["AllowedPattern"];
|
|
13426
13485
|
if (properties["Tier"]) putParams.Tier = properties["Tier"];
|
|
13427
|
-
|
|
13486
|
+
const policies = ssmPoliciesParameter(properties["Policies"]);
|
|
13487
|
+
if (policies !== void 0) putParams.Policies = policies;
|
|
13428
13488
|
if (properties["DataType"]) putParams.DataType = properties["DataType"];
|
|
13429
13489
|
await (await this.getCreateClient()).send(new PutParameterCommand(putParams));
|
|
13430
13490
|
leftBehind = true;
|
|
@@ -13485,7 +13545,8 @@ var SSMParameterProvider = class SSMParameterProvider {
|
|
|
13485
13545
|
if (properties["Description"] !== void 0) putParams.Description = properties["Description"];
|
|
13486
13546
|
if (properties["AllowedPattern"] !== void 0) putParams.AllowedPattern = properties["AllowedPattern"];
|
|
13487
13547
|
if (properties["Tier"] !== void 0) putParams.Tier = properties["Tier"];
|
|
13488
|
-
|
|
13548
|
+
const policies = ssmPoliciesParameter(properties["Policies"]);
|
|
13549
|
+
if (policies !== void 0) putParams.Policies = policies;
|
|
13489
13550
|
if (properties["DataType"] !== void 0) putParams.DataType = properties["DataType"];
|
|
13490
13551
|
await this.ssmClient.send(new PutParameterCommand(putParams));
|
|
13491
13552
|
const plan = planTagDiff(tagMapAsList(previousProperties["Tags"]), tagMapAsList(properties["Tags"]));
|
|
@@ -13631,6 +13692,12 @@ var SSMParameterProvider = class SSMParameterProvider {
|
|
|
13631
13692
|
return null;
|
|
13632
13693
|
}
|
|
13633
13694
|
};
|
|
13695
|
+
function ssmPoliciesParameter(policies) {
|
|
13696
|
+
if (policies === void 0 || policies === null || policies === "") return void 0;
|
|
13697
|
+
if (typeof policies === "string") return policies;
|
|
13698
|
+
if (Array.isArray(policies)) return policies.length === 0 ? void 0 : JSON.stringify(policies);
|
|
13699
|
+
return JSON.stringify(policies);
|
|
13700
|
+
}
|
|
13634
13701
|
|
|
13635
13702
|
//#endregion
|
|
13636
13703
|
//#region src/provisioning/providers/eventbridge-rule-provider.ts
|
|
@@ -44522,6 +44589,7 @@ var NestedStackProvider = class {
|
|
|
44522
44589
|
onDestructivePlan: void 0,
|
|
44523
44590
|
...inheritedSecrets && hasMaskableValues(inheritedSecrets) && { inheritedSecrets },
|
|
44524
44591
|
inheritedPhysicalNameCopies: inheritedPhysicalNameCopiesOf(inheritedSecrets),
|
|
44592
|
+
inheritedReferenceProvenance: snapshotPassProvenance(inheritedSecrets),
|
|
44525
44593
|
...passedClasses && { passedParameterClasses: passedClasses },
|
|
44526
44594
|
passedNoEchoParameters: passedNoEchoParametersOf(inheritedSecrets),
|
|
44527
44595
|
inheritedProducerRegions: getCurrentProducerRegions(),
|
|
@@ -44552,6 +44620,11 @@ var NestedStackProvider = class {
|
|
|
44552
44620
|
refuseMalformedNestedChildOutputs(childStateData.state, childStackName, childRegion, runAccountOf(ctx));
|
|
44553
44621
|
const attributes = this.buildOutputsAttributes(childStateData.state.outputs ?? {});
|
|
44554
44622
|
const rowSecrets = getCurrentResourceSecrets();
|
|
44623
|
+
if (rowSecrets !== void 0) for (const outputKey of Object.keys(childStateData.state.outputs ?? {})) {
|
|
44624
|
+
const entries = outputReferenceProvenanceOf(childStateData.state, outputKey);
|
|
44625
|
+
if (entries === void 0) continue;
|
|
44626
|
+
for (const [token, entry] of Object.entries(entries)) recordReferenceProvenanceEntry(rowSecrets, token, entry, "read");
|
|
44627
|
+
}
|
|
44555
44628
|
if (rowSecrets !== void 0) {
|
|
44556
44629
|
const childResources = childStateData.state.resources;
|
|
44557
44630
|
const ids = childResources !== null && typeof childResources === "object" ? Object.values(childResources).map((record) => record?.physicalId).filter((id) => typeof id === "string" && id !== "") : [];
|
|
@@ -45043,4 +45116,4 @@ var ACMCertificateProvider = class {
|
|
|
45043
45116
|
|
|
45044
45117
|
//#endregion
|
|
45045
45118
|
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 };
|
|
45046
|
-
//# sourceMappingURL=provider-classes
|
|
45119
|
+
//# sourceMappingURL=provider-classes-Xrt4DIC7.js.map
|