@go-to-k/cdkd 0.294.8 → 0.294.9
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-CsajFK4_.js → asg-provider-3uLGAhIx.js} +2 -2
- package/dist/{asg-provider-CsajFK4_.js.map → asg-provider-3uLGAhIx.js.map} +1 -1
- package/dist/cli.js +35 -4
- package/dist/cli.js.map +1 -1
- package/dist/{deploy-engine-C5kAhscq.js → deploy-engine-BTOCDCWf.js} +654 -508
- package/dist/deploy-engine-BTOCDCWf.js.map +1 -0
- package/dist/iam-policy-targets-CMSQGQnm.js.map +1 -1
- package/dist/{iam-role-provider-CPn7nqoS.js → iam-role-provider-CBT2LPe1.js} +2 -2
- package/dist/{iam-role-provider-CPn7nqoS.js.map → iam-role-provider-CBT2LPe1.js.map} +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/{neptune-provider-DlFQdgwe.js → neptune-provider-BQ-CGoYJ.js} +2 -2
- package/dist/{neptune-provider-DlFQdgwe.js.map → neptune-provider-BQ-CGoYJ.js.map} +1 -1
- package/dist/{program-CVOLJJ2z.js → program-DMJnrQOG.js} +254 -16
- package/dist/program-DMJnrQOG.js.map +1 -0
- package/dist/{provider-classes-DlVxBF89.js → provider-classes-DCbt28RB.js} +114 -14
- package/dist/provider-classes-DCbt28RB.js.map +1 -0
- package/dist/{rds-provider-a-vZsR9L.js → rds-provider-J6zl27x3.js} +2 -2
- package/dist/{rds-provider-a-vZsR9L.js.map → rds-provider-J6zl27x3.js.map} +1 -1
- package/dist/{version-DGxZ-zFN.js → version-QrNvZCe0.js} +2 -2
- package/dist/{version-DGxZ-zFN.js.map → version-QrNvZCe0.js.map} +1 -1
- package/package.json +2 -2
- package/dist/deploy-engine-C5kAhscq.js.map +0 -1
- package/dist/program-CVOLJJ2z.js.map +0 -1
- package/dist/provider-classes-DlVxBF89.js.map +0 -1
|
@@ -2,12 +2,12 @@ import { r as getAwsClients } from "./aws-clients-CnmtbrxD.js";
|
|
|
2
2
|
import { A as displaySafe, F as safeMsg, M as isPasteableIdent, P as plainIdentOr, g as generateResourceNameWithFallback, h as generateResourceName, j as displayStackName, k as displayIdent, n as getLogger, v as getCurrentStackName, w as SECRET_REF_MAX_CODE_POINTS } from "./logger-B46YMG0h.js";
|
|
3
3
|
import { $ as compositeIdFormatMessage, A as isTerminalDeleteFailure, B as WITHHELD_AWS_COMMAND, C as refusalTypeShown, Ct as injectiveKeyPrefix, D as ProtectionFlipRegistry, Dn as markNameCollision, Dt as withPasteableAwsProfile, H as pasteableAwsCommand, Hn as markNonRetryable, In as describeAwsFailure, J as isInterruptedWaitError, Jt as ProvisioningError, L as userPoolProtectionSite, Ln as isAwsAuthoredFailure, M as observeThenDisableProtection, Mt as AccountIdUnavailableError, N as protectionFlipKey, Nn as isRetryableTransientError, On as markReplayMayCollide, Ot as ambientClientDefaults, P as rdsFamilyProtectionSite, Pn as isTransientServerError, Pt as CdkdError, Q as canonicalizeRoute53QueryName, Rn as safeStringify, S as quotedRemedyLogicalId, St as injectiveKey, T as resolveExplicitPhysicalId, U as protectedReplacementAdvice, Un as markRedactedCause, V as isAwsCliLiteral, Vn as isThrottlingError, W as renderDisableCommand, Wn as wrapMaskedAwsError, X as ElapsedBudgetRegistry, Xt as ResourceUpdateNotSupportedError, Y as startInterruptWatch, _ as VALUE_NOT_SHOWN, _n as shellQuote, a as onlySecretDerived, at as segmentAfterAnchor, b as isQuotableImportValue, c as recordedPrincipalsRepair, ct as isSecretDerivedValue, dn as isInertUnquoted, dt as withDerivedNameMasks, et as compositeIdSeparatorRefusal, fn as pasteableCommand, g as assertRegionMatch, h as RESOURCE_NOT_FOUND, i as holdsSecretDerivedEntry, j as logGroupProtectionSite, jn as isAmbiguousOutcomeError, jt as credentialFingerprint, k as deleteWithProtectionCompensation, kt as ambientCredentialConfig, ln as commandHole, lt as maskDeep, mn as plainOrDescribed, nt as logicalIdShown, o as readPrincipalLists, ot as createMaskedLogSinks, p as withRemovalDefaults, r as SECRET_DERIVED_READ_LIVE, rt as packCompositeId, st as createMaskedRetryLogger, tt as compositeIdSkipResult, u as clearOnUpdateRemoval, un as hasClauseBreak, ut as maskerOrIdentity, v as isPlainImportJson, vn as withheldTargetClause, w as remedyLogicalId, x as normalizeAwsTagsToCfn, y as isPlainImportValue, z as UNNAMEABLE_ID_CLAUSE, zn as THROTTLING_ERROR_NAMES } from "./iam-policy-targets-CMSQGQnm.js";
|
|
4
4
|
import { s as ambientRegion } from "./aws-client-defaults-D0q0z4dG.js";
|
|
5
|
-
import { $
|
|
6
|
-
import { n as collectInlinePolicyNamesManagedBySiblings, t as IAMRoleProvider } from "./iam-role-provider-
|
|
7
|
-
import { a as canonicalizeIpProtocolValue, c as isAbsoluteAssetPath, i as resolveSecretDerivedPrincipals, l as listNestedTemplateRows, n as runDestroyForStack, o as resolvedResourceTimeoutMs, r as isResolvableSecretPrincipalList, s as findNestedTemplateTreeDefect, t as canonicalizeIpv4Cidr, u as renderNestedTemplateTreeDefect } from "./program-
|
|
8
|
-
import { RDSProvider } from "./rds-provider-
|
|
9
|
-
import { NeptuneProvider } from "./neptune-provider-
|
|
10
|
-
import { ASGProvider } from "./asg-provider-
|
|
5
|
+
import { $t as acquireIdempotencyToken, A as ECR_AUTO_DELETE_IMAGES_TAG, An as reEnableInstanceApiTermination, Bi as toFiniteNumber, C as deleteBudgetKey, Ca as markSameGenerationBag, Cn as isWaitAbandonedError, D as INDEX_SETTLE_POLL_INTERVAL_MS, Di as withoutSilentDropProperties, Dn as isTerminationProtectionPropagationError, Ds as resolveAssemblyPath, E as DELETE_INDEX_WAIT_PROCEED_NOTE, Ea as recoverMaskedOutput, En as ec2InstanceProtectionSite, Es as renderAssemblyPathEscape, F as markRefusedBeforeApplying, Gi as configStringRefusal, Hi as coerceCfnInteger, Ii as WARM_THROUGHPUT_MEMBERS, Ji as requireConfigArray, Jn as s3BucketArn, Ki as readConfigString, Li as coerceWarmThroughput$1, M as hasCdkAutoDeleteTag, Ma as carriesSecretMask, N as isTruthyCfnBoolean, O as deleteTableWithIndexBusyRetry, Oa as dynamicReferenceTokens, On as observeThenDisableInstanceApiTermination, P as getPriorAttempts, Q as getNestedRevertRun, Qn as s3BucketWebsiteUrl, Ri as isWarmThroughputDecrease, S as compensateRemovedDeletionProtection, Sn as withIndeterminateGuard, T as resolveDynamoDbDeleteBudgetMs, Ti as findSilentDropProperties, Ts as displayAssemblyPath, Ui as configBooleanRefusal, Vi as coerceCfnBoolean, Wi as configIntegerRefusal, Xi as requireConfigString, Xn as s3BucketDualStackDomainName, Yi as requireConfigObject, Yn as s3BucketDomainName, Yt as earliestDefined, Zn as s3BucketRegionalDomainName, Zt as reserveStackCreateToken, an as tagMapAsList, b as DYNAMODB_DELETE_MIN_RESOURCE_TIMEOUT_MS, cn as stringifyIfAssigned, do as rewriteTemplateAssetReferences, ea as withRetry, en as DBPROXY_TAGS_WHAT, et as revertNestedChildFromJournal, fa as hasMaskableValues, fi as refuseMalformedResourcesForDestroy, fr as parseWebACLArn, gn as slowCcOperationTimeoutMs, gt as getCurrentProducerRegions, ia as sameLambdaFunctionAddress, in as refuseMalformedDesiredTags, it as withNestedStackContext, j as S3_AUTO_DELETE_OBJECTS_TAG, k as waitForIndexesSettled, kn as reDisableInstanceApiTermination, lt as getStackRecords, mn as getCurrentResourceSecrets, ms as derivePartitionAndUrlSuffix, na as canonicalLambdaFunctionName, nn as planTagDiff, nr as getAccountInfo, on as tagPlanWarning, oo as stringifyValue, ps as canonicalizeRegion, qi as replayWarn, qn as isSettledInstanceState, qr as refuseMalformedNestedChildOutputs, ra as lambdaFunctionNameForMask, rn as readTagList, rt as getCurrentNestedStackContext, sn as definedAttributes, st as awaitInFlightSibling, t as DeployEngine, ta as markAuxiliaryFailure, tn as DBPROXY_TAG_OPTIONS, us as decodeListingKey, vn as unchangedBehindSecretReference, w as resolveDynamoDbDeleteBudgetClock, wa as redactSecretsForState, wn as markWaitAbandoned, ws as describeFileReadFailure, x as beginDeleteWait, xn as deleteSkipReason, y as DynamoDBGlobalTableProvider, zi as toCfnInteger } from "./deploy-engine-BTOCDCWf.js";
|
|
6
|
+
import { n as collectInlinePolicyNamesManagedBySiblings, t as IAMRoleProvider } from "./iam-role-provider-CBT2LPe1.js";
|
|
7
|
+
import { a as canonicalizeIpProtocolValue, c as isAbsoluteAssetPath, i as resolveSecretDerivedPrincipals, l as listNestedTemplateRows, n as runDestroyForStack, o as resolvedResourceTimeoutMs, r as isResolvableSecretPrincipalList, s as findNestedTemplateTreeDefect, t as canonicalizeIpv4Cidr, u as renderNestedTemplateTreeDefect } from "./program-DMJnrQOG.js";
|
|
8
|
+
import { RDSProvider } from "./rds-provider-J6zl27x3.js";
|
|
9
|
+
import { NeptuneProvider } from "./neptune-provider-BQ-CGoYJ.js";
|
|
10
|
+
import { ASGProvider } from "./asg-provider-3uLGAhIx.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, 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";
|
|
@@ -45,7 +45,7 @@ import { CreateWebACLCommand, DeleteWebACLCommand, GetWebACLCommand, ListTagsFor
|
|
|
45
45
|
import { AddCustomAttributesCommand, CognitoIdentityProviderClient, CreateUserPoolCommand, DeleteUserPoolCommand, DescribeUserPoolCommand, GetUserPoolMfaConfigCommand, ListUserPoolsCommand, ResourceNotFoundException as ResourceNotFoundException$9, SetUserPoolMfaConfigCommand, UpdateUserPoolCommand } from "@aws-sdk/client-cognito-identity-provider";
|
|
46
46
|
import { CreateHttpNamespaceCommand, CreatePrivateDnsNamespaceCommand, CreatePublicDnsNamespaceCommand, CreateServiceCommand as CreateServiceCommand$1, DeleteNamespaceCommand, DeleteServiceAttributesCommand, DeleteServiceCommand as DeleteServiceCommand$1, GetNamespaceCommand, GetOperationCommand, GetServiceAttributesCommand, GetServiceCommand, ListNamespacesCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$14, NamespaceNotFound, ResourceInUse, ServiceDiscoveryClient, ServiceNotFound, TagResourceCommand as TagResourceCommand$16, UntagResourceCommand as UntagResourceCommand$16, UpdateHttpNamespaceCommand, UpdatePrivateDnsNamespaceCommand, UpdatePublicDnsNamespaceCommand, UpdateServiceAttributesCommand, UpdateServiceCommand as UpdateServiceCommand$1 } from "@aws-sdk/client-servicediscovery";
|
|
47
47
|
import { AppSyncClient, CreateApiKeyCommand, CreateDataSourceCommand, CreateGraphqlApiCommand, CreateResolverCommand, DeleteApiKeyCommand, DeleteDataSourceCommand, DeleteGraphqlApiCommand, DeleteResolverCommand, GetDataSourceCommand, GetGraphqlApiCommand, GetGraphqlApiEnvironmentVariablesCommand, GetIntrospectionSchemaCommand, GetResolverCommand, ListApiKeysCommand, ListGraphqlApisCommand, NotFoundException as NotFoundException$4, PutGraphqlApiEnvironmentVariablesCommand, StartSchemaCreationCommand, TagResourceCommand as TagResourceCommand$17, UntagResourceCommand as UntagResourceCommand$17, UpdateApiKeyCommand, UpdateDataSourceCommand, UpdateGraphqlApiCommand, UpdateResolverCommand } from "@aws-sdk/client-appsync";
|
|
48
|
-
import {
|
|
48
|
+
import { ConcurrentModificationException, CrawlerRunningException, CreateConnectionCommand, CreateCrawlerCommand, CreateDatabaseCommand, CreateJobCommand, CreateSecurityConfigurationCommand, CreateTableCommand as CreateTableCommand$1, CreateTriggerCommand, CreateWorkflowCommand, DeleteConnectionCommand, DeleteCrawlerCommand, DeleteDatabaseCommand, DeleteJobCommand, DeleteSecurityConfigurationCommand, DeleteTableCommand as DeleteTableCommand$1, DeleteTriggerCommand, DeleteWorkflowCommand, EntityNotFoundException, GetConnectionCommand, GetCrawlerCommand, GetDatabaseCommand, GetJobCommand, GetSecurityConfigurationCommand, GetTableCommand, GetTagsCommand, GetTriggerCommand, GetWorkflowCommand, GlueClient, StartCrawlerScheduleCommand, StartTriggerCommand, StopCrawlerCommand, StopCrawlerScheduleCommand, StopTriggerCommand, TagResourceCommand as TagResourceCommand$18, UntagResourceCommand as UntagResourceCommand$18, UpdateConnectionCommand, UpdateCrawlerCommand, UpdateDatabaseCommand, UpdateJobCommand, UpdateTableCommand as UpdateTableCommand$1, UpdateTriggerCommand, UpdateWorkflowCommand } from "@aws-sdk/client-glue";
|
|
49
49
|
import { BudgetsClient, CreateBudgetCommand, CreateNotificationCommand, CreateSubscriberCommand, DeleteBudgetCommand, DeleteNotificationCommand, DeleteSubscriberCommand, DescribeBudgetCommand, DuplicateRecordException, NotFoundException as NotFoundException$5, TagResourceCommand as TagResourceCommand$19, UntagResourceCommand as UntagResourceCommand$19, UpdateBudgetCommand } from "@aws-sdk/client-budgets";
|
|
50
50
|
import { AddTagsToStreamCommand, CreateStreamCommand, DecreaseStreamRetentionPeriodCommand, DeleteStreamCommand, DeregisterStreamConsumerCommand, DescribeStreamCommand, DescribeStreamConsumerCommand, DescribeStreamSummaryCommand, DisableEnhancedMonitoringCommand, EnableEnhancedMonitoringCommand, IncreaseStreamRetentionPeriodCommand, KinesisClient, ListTagsForResourceCommand as ListTagsForResourceCommand$15, ListTagsForStreamCommand, RegisterStreamConsumerCommand, RemoveTagsFromStreamCommand, ResourceNotFoundException as ResourceNotFoundException$10, StartStreamEncryptionCommand, StopStreamEncryptionCommand, TagResourceCommand as TagResourceCommand$20, UntagResourceCommand as UntagResourceCommand$20, UpdateMaxRecordSizeCommand, UpdateShardCountCommand, UpdateStreamModeCommand } from "@aws-sdk/client-kinesis";
|
|
51
51
|
import { CreateScheduleCommand, DeleteScheduleCommand, GetScheduleCommand, ResourceNotFoundException as ResourceNotFoundException$11, SchedulerClient, UpdateScheduleCommand } from "@aws-sdk/client-scheduler";
|
|
@@ -15388,7 +15388,7 @@ var EC2Provider = class {
|
|
|
15388
15388
|
if (input.knownPhysicalId) return this.verifyExplicit(input.logicalId, input.resourceType, input.knownPhysicalId, input.properties ?? {});
|
|
15389
15389
|
return null;
|
|
15390
15390
|
}
|
|
15391
|
-
async readCurrentState(physicalId, logicalId, resourceType, properties) {
|
|
15391
|
+
async readCurrentState(physicalId, logicalId, resourceType, properties, context) {
|
|
15392
15392
|
try {
|
|
15393
15393
|
switch (resourceType) {
|
|
15394
15394
|
case "AWS::EC2::VPC": return await this.readVpcCurrentState(physicalId);
|
|
@@ -15399,10 +15399,11 @@ var EC2Provider = class {
|
|
|
15399
15399
|
case "AWS::EC2::SecurityGroup": return await this.readSecurityGroupCurrentState(physicalId, properties);
|
|
15400
15400
|
case "AWS::EC2::Instance": return await this.readInstanceCurrentState(physicalId);
|
|
15401
15401
|
case "AWS::EC2::NetworkAcl": return await this.readNetworkAclCurrentState(physicalId);
|
|
15402
|
+
case "AWS::EC2::EIP": return await this.readEipCurrentState(physicalId, properties, context?.afterOwnWrite === true);
|
|
15402
15403
|
case "AWS::EC2::VPCGatewayAttachment": return await this.readVpcGatewayAttachmentCurrentState(physicalId);
|
|
15403
15404
|
case "AWS::EC2::Route": return await this.readRouteCurrentState(physicalId);
|
|
15404
15405
|
case "AWS::EC2::SubnetRouteTableAssociation": return await this.readSubnetRouteTableAssociationCurrentState(physicalId);
|
|
15405
|
-
case "AWS::EC2::SecurityGroupIngress": return await this.readSecurityGroupIngressCurrentState(physicalId, properties);
|
|
15406
|
+
case "AWS::EC2::SecurityGroupIngress": return await this.readSecurityGroupIngressCurrentState(physicalId, properties, context);
|
|
15406
15407
|
case "AWS::EC2::NetworkAclEntry": return await this.readNetworkAclEntryCurrentState(physicalId);
|
|
15407
15408
|
case "AWS::EC2::SubnetNetworkAclAssociation": return await this.readSubnetNetworkAclAssociationCurrentState(physicalId);
|
|
15408
15409
|
default:
|
|
@@ -15488,6 +15489,22 @@ var EC2Provider = class {
|
|
|
15488
15489
|
if (primary?.PrivateIp !== void 0) result["PrivateIpAddress"] = primary.PrivateIp;
|
|
15489
15490
|
return result;
|
|
15490
15491
|
}
|
|
15492
|
+
async readEipCurrentState(physicalId, properties, afterOwnWrite) {
|
|
15493
|
+
const { allocationId, publicIp } = this.parseEipPhysicalId(physicalId);
|
|
15494
|
+
if (!allocationId && !publicIp) return void 0;
|
|
15495
|
+
const addr = (await this.ec2Client.send(new DescribeAddressesCommand(allocationId ? { AllocationIds: [allocationId] } : { PublicIps: [publicIp] }))).Addresses?.find((a) => allocationId ? a.AllocationId === allocationId : a.PublicIp === publicIp);
|
|
15496
|
+
if (!addr) return RESOURCE_NOT_FOUND;
|
|
15497
|
+
const result = {};
|
|
15498
|
+
if (addr.Domain !== void 0) result["Domain"] = addr.Domain;
|
|
15499
|
+
if (addr.InstanceId !== void 0 && properties?.["InstanceId"] != null) result["InstanceId"] = addr.InstanceId;
|
|
15500
|
+
if (addr.NetworkBorderGroup !== void 0) result["NetworkBorderGroup"] = addr.NetworkBorderGroup;
|
|
15501
|
+
if (addr.PublicIpv4Pool !== void 0) result["PublicIpv4Pool"] = addr.PublicIpv4Pool;
|
|
15502
|
+
const tags = normalizeAwsTagsToCfn(addr.Tags);
|
|
15503
|
+
const declared = properties?.["Tags"];
|
|
15504
|
+
const bag = afterOwnWrite && Array.isArray(declared) && !tagListsMatch(tags, declared) ? declared : tags;
|
|
15505
|
+
if (bag.length > 0) result["Tags"] = bag;
|
|
15506
|
+
return result;
|
|
15507
|
+
}
|
|
15491
15508
|
async readRouteTableCurrentState(physicalId) {
|
|
15492
15509
|
const rt = (await this.ec2Client.send(new DescribeRouteTablesCommand({ RouteTableIds: [physicalId] }))).RouteTables?.[0];
|
|
15493
15510
|
if (!rt) return RESOURCE_NOT_FOUND;
|
|
@@ -15657,7 +15674,7 @@ var EC2Provider = class {
|
|
|
15657
15674
|
}
|
|
15658
15675
|
return RESOURCE_NOT_FOUND;
|
|
15659
15676
|
}
|
|
15660
|
-
async readSecurityGroupIngressCurrentState(physicalId, properties) {
|
|
15677
|
+
async readSecurityGroupIngressCurrentState(physicalId, properties, context) {
|
|
15661
15678
|
const parts = physicalId.split("|");
|
|
15662
15679
|
if (parts.length < 4) return void 0;
|
|
15663
15680
|
const groupId = parts[0];
|
|
@@ -15678,13 +15695,50 @@ var EC2Provider = class {
|
|
|
15678
15695
|
GroupId: groupId,
|
|
15679
15696
|
...match
|
|
15680
15697
|
};
|
|
15681
|
-
|
|
15698
|
+
const fallback = await this.readSgIngressByIdentity(groupId, flat, properties, context);
|
|
15699
|
+
return fallback === void 0 ? void 0 : {
|
|
15700
|
+
GroupId: groupId,
|
|
15701
|
+
...fallback
|
|
15702
|
+
};
|
|
15682
15703
|
}
|
|
15683
15704
|
return {
|
|
15684
15705
|
GroupId: groupId,
|
|
15685
15706
|
...flat[0]
|
|
15686
15707
|
};
|
|
15687
15708
|
}
|
|
15709
|
+
async readSgIngressByIdentity(groupId, flat, properties, context) {
|
|
15710
|
+
if (context?.afterOwnWrite === true) return void 0;
|
|
15711
|
+
const recordedId = recordedSgRuleId(context?.attributes);
|
|
15712
|
+
if (recordedId === void 0) return void 0;
|
|
15713
|
+
if (!Number.isFinite(cfnIngressPortValue(properties["FromPort"])) || !Number.isFinite(cfnIngressPortValue(properties["ToPort"]))) return;
|
|
15714
|
+
const identity = (rule) => {
|
|
15715
|
+
const key = JSON.parse(sgRuleKey(rule, "ingress"));
|
|
15716
|
+
delete key["d"];
|
|
15717
|
+
if (properties["SourceSecurityGroupOwnerId"] == null) delete key["peerOwner"];
|
|
15718
|
+
key["f"] = cfnIngressPortValue(rule["FromPort"]);
|
|
15719
|
+
key["t"] = cfnIngressPortValue(rule["ToPort"]);
|
|
15720
|
+
return JSON.stringify(key);
|
|
15721
|
+
};
|
|
15722
|
+
const wanted = identity(properties);
|
|
15723
|
+
const matches = flat.filter((r) => identity(r) === wanted);
|
|
15724
|
+
if (matches.length !== 1) return void 0;
|
|
15725
|
+
const match = matches[0];
|
|
15726
|
+
const siblings = Object.entries(context?.siblings ?? {});
|
|
15727
|
+
if (stackIngressRuleHolder(siblings, "", groupId, properties) !== void 0 || siblings.some(([, sibling]) => sibling.resourceType === "AWS::EC2::SecurityGroupIngress" && recordedSgRuleId(sibling.attributes) === recordedId)) return;
|
|
15728
|
+
let owned;
|
|
15729
|
+
try {
|
|
15730
|
+
owned = (await this.ec2Client.send(new DescribeSecurityGroupRulesCommand({ SecurityGroupRuleIds: [recordedId] }))).SecurityGroupRules?.find((r) => r.SecurityGroupRuleId === recordedId);
|
|
15731
|
+
} catch (err) {
|
|
15732
|
+
this.logger.debug(safeMsg`readCurrentState: recorded rule ${recordedId} could not be read (${describeAwsFailure(err).summary}); the ingress rule stays unknown`);
|
|
15733
|
+
return;
|
|
15734
|
+
}
|
|
15735
|
+
if (owned === void 0 || owned.IsEgress === true || owned.GroupId !== groupId || !securityGroupRuleMatchesCfnIngress(owned, properties) || descriptionKey(owned.Description) !== descriptionKey(match["Description"])) return;
|
|
15736
|
+
return {
|
|
15737
|
+
...match,
|
|
15738
|
+
...properties["FromPort"] != null && { FromPort: properties["FromPort"] },
|
|
15739
|
+
...properties["ToPort"] != null && { ToPort: properties["ToPort"] }
|
|
15740
|
+
};
|
|
15741
|
+
}
|
|
15688
15742
|
async readNetworkAclEntryCurrentState(physicalId) {
|
|
15689
15743
|
const parts = physicalId.split("|");
|
|
15690
15744
|
if (parts.length < 3) return void 0;
|
|
@@ -16061,6 +16115,15 @@ function stackIngressRuleHolder(records, selfLogicalId, groupId, rule, idCheck)
|
|
|
16061
16115
|
}
|
|
16062
16116
|
}
|
|
16063
16117
|
}
|
|
16118
|
+
function tagListsMatch(live, declared) {
|
|
16119
|
+
const pairs = (list) => list.every((entry) => isPlainRecord$1(entry) && typeof entry["Key"] === "string") ? list.map((entry) => {
|
|
16120
|
+
const tag = entry;
|
|
16121
|
+
return JSON.stringify([tag["Key"], tag["Value"] ?? ""]);
|
|
16122
|
+
}).sort() : void 0;
|
|
16123
|
+
const a = pairs(live);
|
|
16124
|
+
const b = pairs(declared);
|
|
16125
|
+
return a !== void 0 && b !== void 0 && JSON.stringify(a) === JSON.stringify(b);
|
|
16126
|
+
}
|
|
16064
16127
|
function isPlainRecord$1(value) {
|
|
16065
16128
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
16066
16129
|
}
|
|
@@ -28554,6 +28617,8 @@ const createGraphqlApiLatch = new AmbiguousCreateLatch("CreateGraphqlApi");
|
|
|
28554
28617
|
const graphqlApisCreatedByThisProcess = new RecentIdSet();
|
|
28555
28618
|
const MAX_GRAPHQL_API_LIST_PAGES = 40;
|
|
28556
28619
|
const MAX_REPORTED_ORPHAN_APIS = 5;
|
|
28620
|
+
const createApiKeyLatch = new AmbiguousCreateLatch("CreateApiKey");
|
|
28621
|
+
const apiKeysCreatedByThisProcess = new RecentIdSet();
|
|
28557
28622
|
const APPSYNC_DATASOURCE_ID_FORMAT = {
|
|
28558
28623
|
label: "AppSync DataSource",
|
|
28559
28624
|
segments: ["apiId", "name"]
|
|
@@ -29755,7 +29820,18 @@ var AppSyncProvider = class {
|
|
|
29755
29820
|
const input = { apiId };
|
|
29756
29821
|
if (properties["Description"]) input.description = properties["Description"];
|
|
29757
29822
|
if (properties["Expires"]) input.expires = properties["Expires"];
|
|
29758
|
-
|
|
29823
|
+
const orphanWindow = createApiKeyLatch.take(logicalId);
|
|
29824
|
+
if (orphanWindow !== void 0) await this.reportPossibleOrphanApiKeys(logicalId, input, orphanWindow, createMaskedLogSinks(this.logger, context?.maskSecrets));
|
|
29825
|
+
const attemptStartMs = Date.now();
|
|
29826
|
+
let response;
|
|
29827
|
+
try {
|
|
29828
|
+
response = await this.getCreateClient().send(new CreateApiKeyCommand(input));
|
|
29829
|
+
} catch (error) {
|
|
29830
|
+
createApiKeyLatch.noteFailure(logicalId, error, attemptStartMs, orphanWindow);
|
|
29831
|
+
throw error;
|
|
29832
|
+
}
|
|
29833
|
+
apiKeyId = response.apiKey.id;
|
|
29834
|
+
apiKeysCreatedByThisProcess.add(injectiveKey(apiId, apiKeyId));
|
|
29759
29835
|
this.logger.debug(`Successfully created ApiKey ${logicalId}: ${apiKeyId}`);
|
|
29760
29836
|
} catch (error) {
|
|
29761
29837
|
const cause = error instanceof Error ? error : void 0;
|
|
@@ -29780,6 +29856,31 @@ var AppSyncProvider = class {
|
|
|
29780
29856
|
}
|
|
29781
29857
|
};
|
|
29782
29858
|
}
|
|
29859
|
+
async reportPossibleOrphanApiKeys(logicalId, input, window, log) {
|
|
29860
|
+
const apiId = String(input.apiId);
|
|
29861
|
+
const description = input.description ?? "";
|
|
29862
|
+
const aws = pasteableAwsCommand(log.mask);
|
|
29863
|
+
const regionArg = await orphanCommandRegionArg(this.getClient(), aws);
|
|
29864
|
+
await reportPossibleOrphans(logicalId, window, log, {
|
|
29865
|
+
action: "CreateApiKey",
|
|
29866
|
+
service: "AppSync",
|
|
29867
|
+
listAction: "ListApiKeys",
|
|
29868
|
+
subject: `an API key on GraphQL API ${log.value(apiId)}${description === "" ? "" : ` described ${log.value(description)}`}`,
|
|
29869
|
+
noun: "API key(s)",
|
|
29870
|
+
list: () => collectOrphanIds(async (nextToken) => {
|
|
29871
|
+
const page = await this.getClient().send(new ListApiKeysCommand({
|
|
29872
|
+
apiId,
|
|
29873
|
+
maxResults: 25,
|
|
29874
|
+
...nextToken && { nextToken }
|
|
29875
|
+
}));
|
|
29876
|
+
return {
|
|
29877
|
+
items: page.apiKeys ?? [],
|
|
29878
|
+
next: page.nextToken
|
|
29879
|
+
};
|
|
29880
|
+
}, (key) => key.id && (key.description ?? "") === description && !apiKeysCreatedByThisProcess.has(injectiveKey(apiId, key.id)) ? `****${key.id.slice(-4)}${key.expires === void 0 || !Number.isFinite(key.expires) ? "" : ` (expires ${(/* @__PURE__ */ new Date(key.expires * 1e3)).toISOString()})`}` : void 0),
|
|
29881
|
+
inspect: () => aws`aws appsync list-api-keys --api-id ${apiId}${regionArg}`.render()
|
|
29882
|
+
});
|
|
29883
|
+
}
|
|
29783
29884
|
async deleteApiKey(logicalId, physicalId, resourceType, context) {
|
|
29784
29885
|
this.logger.debug(`Deleting ApiKey ${logicalId}: ${physicalId}`);
|
|
29785
29886
|
const [apiId, apiKeyId] = physicalId.split("|");
|
|
@@ -30526,7 +30627,6 @@ var GlueProvider = class {
|
|
|
30526
30627
|
attributes: {}
|
|
30527
30628
|
};
|
|
30528
30629
|
} catch (error) {
|
|
30529
|
-
if (error instanceof AlreadyExistsException) throw markNonRetryable(new ProvisioningError(`Failed to create Glue Table ${logicalId}: a table named '${v(tableName)}' is present in database '${v(databaseName)}' (${describeCatalog(catalogId, log.mask)}), so cdkd did not create it and left that table untouched. Choose a TableInput.Name no table holds, or remove that table yourself if it is unwanted. If it is the table this resource already manages, the planned replacement keeps its address: revert the change that planned it.`, resourceType, logicalId, void 0, error));
|
|
30530
30630
|
const cause = error instanceof Error ? error : void 0;
|
|
30531
30631
|
throw this.wrapMaskedError(log.mask, error, (text) => new ProvisioningError(`Failed to create Glue Table ${logicalId}: ${text}`, resourceType, logicalId, void 0, cause));
|
|
30532
30632
|
}
|
|
@@ -42163,4 +42263,4 @@ var ACMCertificateProvider = class {
|
|
|
42163
42263
|
|
|
42164
42264
|
//#endregion
|
|
42165
42265
|
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 };
|
|
42166
|
-
//# sourceMappingURL=provider-classes-
|
|
42266
|
+
//# sourceMappingURL=provider-classes-DCbt28RB.js.map
|