@go-to-k/cdkd 0.294.8 → 0.294.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{asg-provider-CsajFK4_.js → asg-provider-BFlmarbF.js} +2 -2
- package/dist/{asg-provider-CsajFK4_.js.map → asg-provider-BFlmarbF.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-RCOtmm4V.js} +1214 -702
- package/dist/deploy-engine-RCOtmm4V.js.map +1 -0
- package/dist/iam-policy-targets-CMSQGQnm.js.map +1 -1
- package/dist/{iam-role-provider-CPn7nqoS.js → iam-role-provider-2w-Hr9_h.js} +2 -2
- package/dist/{iam-role-provider-CPn7nqoS.js.map → iam-role-provider-2w-Hr9_h.js.map} +1 -1
- package/dist/index.d.ts +6 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/{neptune-provider-DlFQdgwe.js → neptune-provider-CHnIs1hG.js} +2 -2
- package/dist/{neptune-provider-DlFQdgwe.js.map → neptune-provider-CHnIs1hG.js.map} +1 -1
- package/dist/{program-CVOLJJ2z.js → program-Eed63bId.js} +255 -17
- package/dist/program-Eed63bId.js.map +1 -0
- package/dist/{provider-classes-DlVxBF89.js → provider-classes-R7yvwymx.js} +287 -67
- package/dist/provider-classes-R7yvwymx.js.map +1 -0
- package/dist/{rds-provider-a-vZsR9L.js → rds-provider-DqHELwjV.js} +2 -2
- package/dist/{rds-provider-a-vZsR9L.js.map → rds-provider-DqHELwjV.js.map} +1 -1
- package/dist/{version-DGxZ-zFN.js → version-BNo3JdVW.js} +2 -2
- package/dist/{version-DGxZ-zFN.js.map → version-BNo3JdVW.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 { $i as
|
|
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 { $i as requireConfigObject, $n as s3BucketDomainName, $t as earliestDefined, A as ECR_AUTO_DELETE_IMAGES_TAG, Aa as recoverMaskedOutput, An as ec2InstanceProtectionSite, As as renderAssemblyPathEscape, At as redactedDeleteAddressSkip, Bi as WARM_THROUGHPUT_MEMBERS, C as deleteBudgetKey, D as INDEX_SETTLE_POLL_INTERVAL_MS, Da as markSameGenerationBag, Dn as isWaitAbandonedError, Dt as REDACTED_DELETE_ADDRESS_SKIP_REASON, E as DELETE_INDEX_WAIT_PROCEED_NOTE, En as withIndeterminateGuard, F as markRefusedBeforeApplying, Gi as coerceCfnBoolean, Hi as isWarmThroughputDecrease, Ia as carriesSecretMask, Ji as configIntegerRefusal, Ki as coerceCfnInteger, M as hasCdkAutoDeleteTag, Ma as dynamicReferenceTokens, Mn as observeThenDisableInstanceApiTermination, N as isTruthyCfnBoolean, Nn as reDisableInstanceApiTermination, O as deleteTableWithIndexBusyRetry, Oa as redactSecretsForState, On as markWaitAbandoned, Os as describeFileReadFailure, Ot as isRedactedRecordedValue, P as getPriorAttempts, Pn as reEnableInstanceApiTermination, Q as getNestedRevertRun, Qi as requireConfigArray, Qn as s3BucketArn, S as compensateRemovedDeletionProtection, Sn as unchangedBehindSecretReference, T as resolveDynamoDbDeleteBudgetMs, Tn as deleteSkipReason, Ui as toCfnInteger, Vi as coerceWarmThroughput$1, Wi as toFiniteNumber, Xi as readConfigString, Yi as configStringRefusal, Zi as replayWarn, Zn as isSettledInstanceState, Zr as refuseMalformedNestedChildOutputs, _s as canonicalizeRegion, aa as markAuxiliaryFailure, an as DBPROXY_TAG_OPTIONS, b as DYNAMODB_DELETE_MIN_RESOURCE_TIMEOUT_MS, bn as slowCcOperationTimeoutMs, ca as sameLambdaFunctionAddress, cn as refuseMalformedDesiredTags, dn as definedAttributes, ea as requireConfigString, er as s3BucketDualStackDomainName, et as revertNestedChildFromJournal, fn as stringifyIfAssigned, ga as hasMaskableValues, gi as refuseMalformedResourcesForDestroy, gr as parseWebACLArn, gt as getCurrentProducerRegions, ho as rewriteTemplateAssetReferences, ia as withRetry, in as DBPROXY_TAGS_WHAT, it as withNestedStackContext, j as S3_AUTO_DELETE_OBJECTS_TAG, ji as withoutSilentDropProperties, jn as isTerminationProtectionPropagationError, js as resolveAssemblyPath, k as waitForIndexesSettled, ki as findSilentDropProperties, ks as displayAssemblyPath, kt as redactedDeleteAddressFields, ln as tagMapAsList, lt as getStackRecords, ms as decodeListingKey, nr as s3BucketWebsiteUrl, oa as canonicalLambdaFunctionName, on as planTagDiff, or as getAccountInfo, qi as configBooleanRefusal, rn as acquireIdempotencyToken, rt as getCurrentNestedStackContext, sa as lambdaFunctionNameForMask, sn as readTagList, st as awaitInFlightSibling, t as DeployEngine, tn as reserveStackCreateToken, tr as s3BucketRegionalDomainName, un as tagPlanWarning, uo as stringifyValue, vn as getCurrentResourceSecrets, vs as derivePartitionAndUrlSuffix, w as resolveDynamoDbDeleteBudgetClock, x as beginDeleteWait, y as DynamoDBGlobalTableProvider } from "./deploy-engine-RCOtmm4V.js";
|
|
6
|
+
import { n as collectInlinePolicyNamesManagedBySiblings, t as IAMRoleProvider } from "./iam-role-provider-2w-Hr9_h.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-Eed63bId.js";
|
|
8
|
+
import { RDSProvider } from "./rds-provider-DqHELwjV.js";
|
|
9
|
+
import { NeptuneProvider } from "./neptune-provider-CHnIs1hG.js";
|
|
10
|
+
import { ASGProvider } from "./asg-provider-BFlmarbF.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";
|
|
@@ -39,13 +39,13 @@ import { AddTagsToResourceCommand as AddTagsToResourceCommand$2, CreateDBProxyCo
|
|
|
39
39
|
import * as zlib from "node:zlib";
|
|
40
40
|
import { ApiGatewayV2Client, CreateApiCommand, CreateAuthorizerCommand as CreateAuthorizerCommand$1, CreateIntegrationCommand, CreateRouteCommand as CreateRouteCommand$1, CreateStageCommand as CreateStageCommand$1, DeleteAccessLogSettingsCommand, DeleteApiCommand, DeleteAuthorizerCommand as DeleteAuthorizerCommand$1, DeleteCorsConfigurationCommand, DeleteIntegrationCommand, DeleteRouteCommand as DeleteRouteCommand$1, DeleteRouteRequestParameterCommand, DeleteRouteSettingsCommand, DeleteStageCommand as DeleteStageCommand$1, GetApiCommand, GetApisCommand, GetAuthorizerCommand as GetAuthorizerCommand$1, GetAuthorizersCommand as GetAuthorizersCommand$1, GetIntegrationCommand, GetIntegrationsCommand, GetRouteCommand, GetStageCommand as GetStageCommand$1, NotFoundException as NotFoundException$3, UpdateApiCommand, UpdateAuthorizerCommand as UpdateAuthorizerCommand$1, UpdateIntegrationCommand, UpdateRouteCommand, UpdateStageCommand as UpdateStageCommand$1 } from "@aws-sdk/client-apigatewayv2";
|
|
41
41
|
import { CreateStateMachineCommand, DeleteStateMachineCommand, DescribeStateMachineCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$11, SFNClient, StateMachineDoesNotExist, TagResourceCommand as TagResourceCommand$13, UntagResourceCommand as UntagResourceCommand$13, UpdateStateMachineCommand } from "@aws-sdk/client-sfn";
|
|
42
|
-
import { CreateClusterCommand, CreateServiceCommand, DeleteClusterCommand, DeleteServiceCommand, DeregisterTaskDefinitionCommand, DescribeClustersCommand, DescribeServicesCommand, DescribeTaskDefinitionCommand, ECSClient, PutClusterCapacityProvidersCommand, RegisterTaskDefinitionCommand, TagResourceCommand as TagResourceCommand$14, UntagResourceCommand as UntagResourceCommand$14, UpdateClusterCommand, UpdateServiceCommand, waitUntilServicesStable } from "@aws-sdk/client-ecs";
|
|
42
|
+
import { CreateClusterCommand, CreateServiceCommand, DeleteClusterCommand, DeleteServiceCommand, DeregisterTaskDefinitionCommand, DescribeClustersCommand, DescribeServicesCommand, DescribeTaskDefinitionCommand, ECSClient, ListTaskDefinitionsCommand, PutClusterCapacityProvidersCommand, RegisterTaskDefinitionCommand, TagResourceCommand as TagResourceCommand$14, UntagResourceCommand as UntagResourceCommand$14, UpdateClusterCommand, UpdateServiceCommand, waitUntilServicesStable } from "@aws-sdk/client-ecs";
|
|
43
43
|
import { AddTagsToResourceCommand as AddTagsToResourceCommand$3, CreateDBClusterCommand as CreateDBClusterCommand$1, CreateDBInstanceCommand as CreateDBInstanceCommand$1, CreateDBSubnetGroupCommand as CreateDBSubnetGroupCommand$1, DeleteDBClusterCommand as DeleteDBClusterCommand$1, DeleteDBInstanceCommand as DeleteDBInstanceCommand$1, DeleteDBSubnetGroupCommand as DeleteDBSubnetGroupCommand$1, DescribeDBClustersCommand as DescribeDBClustersCommand$1, DescribeDBInstancesCommand as DescribeDBInstancesCommand$1, DescribeDBSubnetGroupsCommand as DescribeDBSubnetGroupsCommand$1, DocDBClient, ListTagsForResourceCommand as ListTagsForResourceCommand$12, ModifyDBClusterCommand as ModifyDBClusterCommand$1, ModifyDBInstanceCommand as ModifyDBInstanceCommand$1, ModifyDBSubnetGroupCommand as ModifyDBSubnetGroupCommand$1, RemoveTagsFromResourceCommand as RemoveTagsFromResourceCommand$3 } from "@aws-sdk/client-docdb";
|
|
44
44
|
import { CreateWebACLCommand, DeleteWebACLCommand, GetWebACLCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$13, TagResourceCommand as TagResourceCommand$15, UntagResourceCommand as UntagResourceCommand$15, UpdateWebACLCommand, WAFNonexistentItemException, WAFV2Client } from "@aws-sdk/client-wafv2";
|
|
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";
|
|
@@ -57,36 +57,11 @@ import { CreateDeliveryStreamCommand, DeleteDeliveryStreamCommand, DescribeDeliv
|
|
|
57
57
|
import { AddTagsCommand as AddTagsCommand$2, CloudTrailClient, CreateTrailCommand, DeleteTrailCommand, GetEventSelectorsCommand, GetInsightSelectorsCommand, GetTrailCommand, GetTrailStatusCommand, ListTagsCommand as ListTagsCommand$2, PutEventSelectorsCommand, PutInsightSelectorsCommand, RemoveTagsCommand as RemoveTagsCommand$2, StartLoggingCommand, StopLoggingCommand, TrailNotFoundException, UpdateTrailCommand } from "@aws-sdk/client-cloudtrail";
|
|
58
58
|
import { BatchGetProjectsCommand, CodeBuildClient, CreateProjectCommand, DeleteProjectCommand, ResourceNotFoundException as ResourceNotFoundException$13, UpdateProjectCommand } from "@aws-sdk/client-codebuild";
|
|
59
59
|
import { CodeCommitClient, CreateCommitCommand, CreateRepositoryCommand as CreateRepositoryCommand$1, DeleteRepositoryCommand as DeleteRepositoryCommand$1, GetRepositoryCommand, GetRepositoryTriggersCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$16, PutRepositoryTriggersCommand, RepositoryDoesNotExistException, TagResourceCommand as TagResourceCommand$23, UntagResourceCommand as UntagResourceCommand$23, UpdateRepositoryDescriptionCommand, UpdateRepositoryEncryptionKeyCommand, UpdateRepositoryNameCommand } from "@aws-sdk/client-codecommit";
|
|
60
|
-
import { CreateLifecyclePolicyCommand, DLMClient, DeleteLifecyclePolicyCommand as DeleteLifecyclePolicyCommand$1, GetLifecyclePolicyCommand as GetLifecyclePolicyCommand$1, ResourceNotFoundException as ResourceNotFoundException$14, TagResourceCommand as TagResourceCommand$24, UntagResourceCommand as UntagResourceCommand$24, UpdateLifecyclePolicyCommand } from "@aws-sdk/client-dlm";
|
|
60
|
+
import { CreateLifecyclePolicyCommand, DLMClient, DeleteLifecyclePolicyCommand as DeleteLifecyclePolicyCommand$1, GetLifecyclePoliciesCommand, GetLifecyclePolicyCommand as GetLifecyclePolicyCommand$1, ResourceNotFoundException as ResourceNotFoundException$14, TagResourceCommand as TagResourceCommand$24, UntagResourceCommand as UntagResourceCommand$24, UpdateLifecyclePolicyCommand } from "@aws-sdk/client-dlm";
|
|
61
61
|
import { CreateVectorBucketCommand, DeleteIndexCommand, DeleteVectorBucketCommand, GetVectorBucketCommand, ListIndexesCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$17, S3VectorsClient, TagResourceCommand as TagResourceCommand$25, UntagResourceCommand as UntagResourceCommand$25 } from "@aws-sdk/client-s3vectors";
|
|
62
62
|
import { ListTagsForResourceCommand as ListTagsForResourceCommand$18, S3ControlClient, TagResourceCommand as TagResourceCommand$26, UntagResourceCommand as UntagResourceCommand$26 } from "@aws-sdk/client-s3-control";
|
|
63
63
|
import { CreateNamespaceCommand, CreateTableBucketCommand, CreateTableCommand as CreateTableCommand$2, DeleteNamespaceCommand as DeleteNamespaceCommand$1, DeleteTableBucketCommand, DeleteTableCommand as DeleteTableCommand$2, GetNamespaceCommand as GetNamespaceCommand$1, GetTableBucketCommand, GetTableCommand as GetTableCommand$1, ListNamespacesCommand as ListNamespacesCommand$1, ListTableBucketsCommand, ListTablesCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$19, NotFoundException as NotFoundException$7, S3TablesClient, TagResourceCommand as TagResourceCommand$27, UntagResourceCommand as UntagResourceCommand$27 } from "@aws-sdk/client-s3tables";
|
|
64
64
|
|
|
65
|
-
//#region src/provisioning/redacted-delete-address.ts
|
|
66
|
-
function isRedactedRecordedValue(value) {
|
|
67
|
-
if (carriesSecretMask(value)) return true;
|
|
68
|
-
let text;
|
|
69
|
-
try {
|
|
70
|
-
text = typeof value === "string" ? value : JSON.stringify(value);
|
|
71
|
-
} catch {
|
|
72
|
-
return false;
|
|
73
|
-
}
|
|
74
|
-
return text !== void 0 && dynamicReferenceTokens(text).length > 0;
|
|
75
|
-
}
|
|
76
|
-
const REDACTED_DELETE_ADDRESS_SKIP_REASON = "redacted address property in state — no delete issued";
|
|
77
|
-
function redactedDeleteAddressFields(fields) {
|
|
78
|
-
return Object.keys(fields).filter((key) => isRedactedRecordedValue(fields[key]));
|
|
79
|
-
}
|
|
80
|
-
function redactedDeleteAddressSkip(logger, logicalId, what, redactedFields) {
|
|
81
|
-
if (redactedFields.length === 0) return void 0;
|
|
82
|
-
logger.warn(safeMsg`${what} ${logicalId} is recorded in state with ${redactedFields.join(", ")} ` + "redacted (the '***' mask of a NoEcho value it read, or a secret '{{resolve:...}}' reference), which names nothing in AWS; skipping deletion — no AWS call is issued, so the resource is LEFT IN PLACE unless a parent resource this run also deletes removes it (then only the record is stale). Re-deploying records the same redaction again. The state record is KEPT and the run reports the skip: on 'cdkd destroy' / 'cdkd state destroy' (which exits non-zero) and, since issue 1762, on the plain DELETE of a resource removed from the template during cdkd deploy. Remove the resource by hand, then clear the stack's records with 'cdkd state orphan <stack>' — that command drops EVERY record for the stack, not just this one. NOTE a deploy-side REPLACEMENT or rollback delete instead FAILS the resource (https://github.com/go-to-k/cdkd/issues/1762) — the old resource is left untracked there, so remove it by hand.");
|
|
83
|
-
return {
|
|
84
|
-
outcome: "skipped",
|
|
85
|
-
reason: REDACTED_DELETE_ADDRESS_SKIP_REASON
|
|
86
|
-
};
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
//#endregion
|
|
90
65
|
//#region src/provisioning/providers/iam-policy-provider.ts
|
|
91
66
|
const POLICY_NAME_SKIP_REASON = "no policy name in state — no delete issued";
|
|
92
67
|
const POLICY_NO_TARGET_SKIP_REASON = "no Roles/Groups/Users in state — no delete issued";
|
|
@@ -15388,7 +15363,7 @@ var EC2Provider = class {
|
|
|
15388
15363
|
if (input.knownPhysicalId) return this.verifyExplicit(input.logicalId, input.resourceType, input.knownPhysicalId, input.properties ?? {});
|
|
15389
15364
|
return null;
|
|
15390
15365
|
}
|
|
15391
|
-
async readCurrentState(physicalId, logicalId, resourceType, properties) {
|
|
15366
|
+
async readCurrentState(physicalId, logicalId, resourceType, properties, context) {
|
|
15392
15367
|
try {
|
|
15393
15368
|
switch (resourceType) {
|
|
15394
15369
|
case "AWS::EC2::VPC": return await this.readVpcCurrentState(physicalId);
|
|
@@ -15399,10 +15374,11 @@ var EC2Provider = class {
|
|
|
15399
15374
|
case "AWS::EC2::SecurityGroup": return await this.readSecurityGroupCurrentState(physicalId, properties);
|
|
15400
15375
|
case "AWS::EC2::Instance": return await this.readInstanceCurrentState(physicalId);
|
|
15401
15376
|
case "AWS::EC2::NetworkAcl": return await this.readNetworkAclCurrentState(physicalId);
|
|
15377
|
+
case "AWS::EC2::EIP": return await this.readEipCurrentState(physicalId, properties, context?.afterOwnWrite === true);
|
|
15402
15378
|
case "AWS::EC2::VPCGatewayAttachment": return await this.readVpcGatewayAttachmentCurrentState(physicalId);
|
|
15403
15379
|
case "AWS::EC2::Route": return await this.readRouteCurrentState(physicalId);
|
|
15404
15380
|
case "AWS::EC2::SubnetRouteTableAssociation": return await this.readSubnetRouteTableAssociationCurrentState(physicalId);
|
|
15405
|
-
case "AWS::EC2::SecurityGroupIngress": return await this.readSecurityGroupIngressCurrentState(physicalId, properties);
|
|
15381
|
+
case "AWS::EC2::SecurityGroupIngress": return await this.readSecurityGroupIngressCurrentState(physicalId, properties, context);
|
|
15406
15382
|
case "AWS::EC2::NetworkAclEntry": return await this.readNetworkAclEntryCurrentState(physicalId);
|
|
15407
15383
|
case "AWS::EC2::SubnetNetworkAclAssociation": return await this.readSubnetNetworkAclAssociationCurrentState(physicalId);
|
|
15408
15384
|
default:
|
|
@@ -15488,6 +15464,22 @@ var EC2Provider = class {
|
|
|
15488
15464
|
if (primary?.PrivateIp !== void 0) result["PrivateIpAddress"] = primary.PrivateIp;
|
|
15489
15465
|
return result;
|
|
15490
15466
|
}
|
|
15467
|
+
async readEipCurrentState(physicalId, properties, afterOwnWrite) {
|
|
15468
|
+
const { allocationId, publicIp } = this.parseEipPhysicalId(physicalId);
|
|
15469
|
+
if (!allocationId && !publicIp) return void 0;
|
|
15470
|
+
const addr = (await this.ec2Client.send(new DescribeAddressesCommand(allocationId ? { AllocationIds: [allocationId] } : { PublicIps: [publicIp] }))).Addresses?.find((a) => allocationId ? a.AllocationId === allocationId : a.PublicIp === publicIp);
|
|
15471
|
+
if (!addr) return RESOURCE_NOT_FOUND;
|
|
15472
|
+
const result = {};
|
|
15473
|
+
if (addr.Domain !== void 0) result["Domain"] = addr.Domain;
|
|
15474
|
+
if (addr.InstanceId !== void 0 && properties?.["InstanceId"] != null) result["InstanceId"] = addr.InstanceId;
|
|
15475
|
+
if (addr.NetworkBorderGroup !== void 0) result["NetworkBorderGroup"] = addr.NetworkBorderGroup;
|
|
15476
|
+
if (addr.PublicIpv4Pool !== void 0) result["PublicIpv4Pool"] = addr.PublicIpv4Pool;
|
|
15477
|
+
const tags = normalizeAwsTagsToCfn(addr.Tags);
|
|
15478
|
+
const declared = properties?.["Tags"];
|
|
15479
|
+
const bag = afterOwnWrite && Array.isArray(declared) && !tagListsMatch(tags, declared) ? declared : tags;
|
|
15480
|
+
if (bag.length > 0) result["Tags"] = bag;
|
|
15481
|
+
return result;
|
|
15482
|
+
}
|
|
15491
15483
|
async readRouteTableCurrentState(physicalId) {
|
|
15492
15484
|
const rt = (await this.ec2Client.send(new DescribeRouteTablesCommand({ RouteTableIds: [physicalId] }))).RouteTables?.[0];
|
|
15493
15485
|
if (!rt) return RESOURCE_NOT_FOUND;
|
|
@@ -15657,7 +15649,7 @@ var EC2Provider = class {
|
|
|
15657
15649
|
}
|
|
15658
15650
|
return RESOURCE_NOT_FOUND;
|
|
15659
15651
|
}
|
|
15660
|
-
async readSecurityGroupIngressCurrentState(physicalId, properties) {
|
|
15652
|
+
async readSecurityGroupIngressCurrentState(physicalId, properties, context) {
|
|
15661
15653
|
const parts = physicalId.split("|");
|
|
15662
15654
|
if (parts.length < 4) return void 0;
|
|
15663
15655
|
const groupId = parts[0];
|
|
@@ -15678,13 +15670,50 @@ var EC2Provider = class {
|
|
|
15678
15670
|
GroupId: groupId,
|
|
15679
15671
|
...match
|
|
15680
15672
|
};
|
|
15681
|
-
|
|
15673
|
+
const fallback = await this.readSgIngressByIdentity(groupId, flat, properties, context);
|
|
15674
|
+
return fallback === void 0 ? void 0 : {
|
|
15675
|
+
GroupId: groupId,
|
|
15676
|
+
...fallback
|
|
15677
|
+
};
|
|
15682
15678
|
}
|
|
15683
15679
|
return {
|
|
15684
15680
|
GroupId: groupId,
|
|
15685
15681
|
...flat[0]
|
|
15686
15682
|
};
|
|
15687
15683
|
}
|
|
15684
|
+
async readSgIngressByIdentity(groupId, flat, properties, context) {
|
|
15685
|
+
if (context?.afterOwnWrite === true) return void 0;
|
|
15686
|
+
const recordedId = recordedSgRuleId(context?.attributes);
|
|
15687
|
+
if (recordedId === void 0) return void 0;
|
|
15688
|
+
if (!Number.isFinite(cfnIngressPortValue(properties["FromPort"])) || !Number.isFinite(cfnIngressPortValue(properties["ToPort"]))) return;
|
|
15689
|
+
const identity = (rule) => {
|
|
15690
|
+
const key = JSON.parse(sgRuleKey(rule, "ingress"));
|
|
15691
|
+
delete key["d"];
|
|
15692
|
+
if (properties["SourceSecurityGroupOwnerId"] == null) delete key["peerOwner"];
|
|
15693
|
+
key["f"] = cfnIngressPortValue(rule["FromPort"]);
|
|
15694
|
+
key["t"] = cfnIngressPortValue(rule["ToPort"]);
|
|
15695
|
+
return JSON.stringify(key);
|
|
15696
|
+
};
|
|
15697
|
+
const wanted = identity(properties);
|
|
15698
|
+
const matches = flat.filter((r) => identity(r) === wanted);
|
|
15699
|
+
if (matches.length !== 1) return void 0;
|
|
15700
|
+
const match = matches[0];
|
|
15701
|
+
const siblings = Object.entries(context?.siblings ?? {});
|
|
15702
|
+
if (stackIngressRuleHolder(siblings, "", groupId, properties) !== void 0 || siblings.some(([, sibling]) => sibling.resourceType === "AWS::EC2::SecurityGroupIngress" && recordedSgRuleId(sibling.attributes) === recordedId)) return;
|
|
15703
|
+
let owned;
|
|
15704
|
+
try {
|
|
15705
|
+
owned = (await this.ec2Client.send(new DescribeSecurityGroupRulesCommand({ SecurityGroupRuleIds: [recordedId] }))).SecurityGroupRules?.find((r) => r.SecurityGroupRuleId === recordedId);
|
|
15706
|
+
} catch (err) {
|
|
15707
|
+
this.logger.debug(safeMsg`readCurrentState: recorded rule ${recordedId} could not be read (${describeAwsFailure(err).summary}); the ingress rule stays unknown`);
|
|
15708
|
+
return;
|
|
15709
|
+
}
|
|
15710
|
+
if (owned === void 0 || owned.IsEgress === true || owned.GroupId !== groupId || !securityGroupRuleMatchesCfnIngress(owned, properties) || descriptionKey(owned.Description) !== descriptionKey(match["Description"])) return;
|
|
15711
|
+
return {
|
|
15712
|
+
...match,
|
|
15713
|
+
...properties["FromPort"] != null && { FromPort: properties["FromPort"] },
|
|
15714
|
+
...properties["ToPort"] != null && { ToPort: properties["ToPort"] }
|
|
15715
|
+
};
|
|
15716
|
+
}
|
|
15688
15717
|
async readNetworkAclEntryCurrentState(physicalId) {
|
|
15689
15718
|
const parts = physicalId.split("|");
|
|
15690
15719
|
if (parts.length < 3) return void 0;
|
|
@@ -16061,6 +16090,15 @@ function stackIngressRuleHolder(records, selfLogicalId, groupId, rule, idCheck)
|
|
|
16061
16090
|
}
|
|
16062
16091
|
}
|
|
16063
16092
|
}
|
|
16093
|
+
function tagListsMatch(live, declared) {
|
|
16094
|
+
const pairs = (list) => list.every((entry) => isPlainRecord$1(entry) && typeof entry["Key"] === "string") ? list.map((entry) => {
|
|
16095
|
+
const tag = entry;
|
|
16096
|
+
return JSON.stringify([tag["Key"], tag["Value"] ?? ""]);
|
|
16097
|
+
}).sort() : void 0;
|
|
16098
|
+
const a = pairs(live);
|
|
16099
|
+
const b = pairs(declared);
|
|
16100
|
+
return a !== void 0 && b !== void 0 && JSON.stringify(a) === JSON.stringify(b);
|
|
16101
|
+
}
|
|
16064
16102
|
function isPlainRecord$1(value) {
|
|
16065
16103
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
16066
16104
|
}
|
|
@@ -20616,6 +20654,11 @@ function wasMeaningfullyConfigured(value, discriminatorKey) {
|
|
|
20616
20654
|
|
|
20617
20655
|
//#endregion
|
|
20618
20656
|
//#region src/provisioning/providers/ecs-provider.ts
|
|
20657
|
+
const registerTaskDefinitionLatch = new AmbiguousCreateLatch("ecs:RegisterTaskDefinition");
|
|
20658
|
+
const taskDefinitionsRegisteredByThisProcess = new RecentIdSet();
|
|
20659
|
+
function familyOfTaskDefinitionArn(arn) {
|
|
20660
|
+
return /:task-definition\/(.+):\d+$/.exec(arn)?.[1];
|
|
20661
|
+
}
|
|
20619
20662
|
function convertTags(tags) {
|
|
20620
20663
|
if (tags.length === 0) return void 0;
|
|
20621
20664
|
return tags.map((t) => ({
|
|
@@ -20686,6 +20729,7 @@ function isEcsErrorNamed(error, names) {
|
|
|
20686
20729
|
const settleRolloutDelays = { sleep: (ms) => new Promise((resolve) => setTimeout(resolve, ms)) };
|
|
20687
20730
|
var ECSProvider = class {
|
|
20688
20731
|
ecsClient;
|
|
20732
|
+
taskDefinitionCreateClient;
|
|
20689
20733
|
providerRegion = ambientRegion();
|
|
20690
20734
|
logger = getLogger().child("ECSProvider");
|
|
20691
20735
|
removalDefaults = /* @__PURE__ */ new Map([["AWS::ECS::Service", /* @__PURE__ */ new Map([
|
|
@@ -20764,6 +20808,65 @@ var ECSProvider = class {
|
|
|
20764
20808
|
});
|
|
20765
20809
|
return this.ecsClient;
|
|
20766
20810
|
}
|
|
20811
|
+
getTaskDefinitionCreateClient() {
|
|
20812
|
+
if (!this.taskDefinitionCreateClient) this.taskDefinitionCreateClient = withoutServerErrorRetries(new ECSClient({
|
|
20813
|
+
...ambientClientDefaults(),
|
|
20814
|
+
...this.providerRegion ? { region: this.providerRegion } : {}
|
|
20815
|
+
}));
|
|
20816
|
+
return this.taskDefinitionCreateClient;
|
|
20817
|
+
}
|
|
20818
|
+
async reportPossibleOrphanTaskDefinitions(logicalId, family, window, log) {
|
|
20819
|
+
const client = this.getClient();
|
|
20820
|
+
const aws = pasteableAwsCommand(log.mask);
|
|
20821
|
+
const regionArg = await orphanCommandRegionArg(client, aws);
|
|
20822
|
+
await reportPossibleOrphans(logicalId, window, log, {
|
|
20823
|
+
action: "RegisterTaskDefinition",
|
|
20824
|
+
service: "ECS",
|
|
20825
|
+
listAction: "ListTaskDefinitions",
|
|
20826
|
+
subject: `a revision of task definition family ${log.value(family)}`,
|
|
20827
|
+
noun: "task definition revision(s)",
|
|
20828
|
+
list: async () => {
|
|
20829
|
+
const ids = [];
|
|
20830
|
+
let nextToken;
|
|
20831
|
+
let pages = 0;
|
|
20832
|
+
do {
|
|
20833
|
+
const page = await client.send(new ListTaskDefinitionsCommand({
|
|
20834
|
+
familyPrefix: family,
|
|
20835
|
+
status: "ACTIVE",
|
|
20836
|
+
sort: "DESC",
|
|
20837
|
+
...nextToken && { nextToken }
|
|
20838
|
+
}));
|
|
20839
|
+
pages++;
|
|
20840
|
+
for (const arn of page.taskDefinitionArns ?? []) {
|
|
20841
|
+
if (familyOfTaskDefinitionArn(arn) !== family) continue;
|
|
20842
|
+
let registeredAt;
|
|
20843
|
+
let active = true;
|
|
20844
|
+
try {
|
|
20845
|
+
const described = await client.send(new DescribeTaskDefinitionCommand({ taskDefinition: arn }));
|
|
20846
|
+
registeredAt = described.taskDefinition?.registeredAt;
|
|
20847
|
+
active = (described.taskDefinition?.status ?? "ACTIVE") === "ACTIVE";
|
|
20848
|
+
} catch (error) {
|
|
20849
|
+
if (isTaskDefinitionMissingError(error)) continue;
|
|
20850
|
+
throw error;
|
|
20851
|
+
}
|
|
20852
|
+
if (registeredAt === void 0 || registeredAt.getTime() < window.floorMs) return {
|
|
20853
|
+
ids,
|
|
20854
|
+
truncated: false
|
|
20855
|
+
};
|
|
20856
|
+
if (active && isInsideWindow(registeredAt, window) && !taskDefinitionsRegisteredByThisProcess.has(arn)) ids.push(arn);
|
|
20857
|
+
}
|
|
20858
|
+
nextToken = page.nextToken;
|
|
20859
|
+
} while (nextToken && pages < 20);
|
|
20860
|
+
return {
|
|
20861
|
+
ids,
|
|
20862
|
+
truncated: Boolean(nextToken)
|
|
20863
|
+
};
|
|
20864
|
+
},
|
|
20865
|
+
inspect: (arn) => aws`aws ecs describe-task-definition --task-definition ${arn}${regionArg}`.render(),
|
|
20866
|
+
remove: (arn) => aws`aws ecs deregister-task-definition --task-definition ${arn}${regionArg}`.render(),
|
|
20867
|
+
removeVerb: "deregister it"
|
|
20868
|
+
});
|
|
20869
|
+
}
|
|
20767
20870
|
wrapMaskedError(log, error, build) {
|
|
20768
20871
|
const raw = error instanceof Error ? error.message : String(error);
|
|
20769
20872
|
const masked = log.mask(raw);
|
|
@@ -20915,28 +21018,39 @@ var ECSProvider = class {
|
|
|
20915
21018
|
async createTaskDefinition(logicalId, resourceType, properties, log) {
|
|
20916
21019
|
log.debug(`Creating ECS task definition ${logicalId}`);
|
|
20917
21020
|
const desiredTags = refuseMalformedDesiredTags(properties["Tags"], resourceType, logicalId);
|
|
20918
|
-
const
|
|
21021
|
+
const family = properties["Family"] || generateResourceName(logicalId, { maxLength: 255 });
|
|
20919
21022
|
try {
|
|
20920
|
-
const
|
|
20921
|
-
|
|
20922
|
-
|
|
20923
|
-
|
|
20924
|
-
|
|
20925
|
-
|
|
20926
|
-
|
|
20927
|
-
|
|
20928
|
-
|
|
20929
|
-
|
|
20930
|
-
|
|
20931
|
-
|
|
20932
|
-
|
|
20933
|
-
|
|
20934
|
-
|
|
20935
|
-
|
|
20936
|
-
|
|
20937
|
-
|
|
20938
|
-
|
|
21023
|
+
const orphanWindow = registerTaskDefinitionLatch.take(logicalId);
|
|
21024
|
+
if (orphanWindow !== void 0) await this.reportPossibleOrphanTaskDefinitions(logicalId, family, orphanWindow, log);
|
|
21025
|
+
const attemptStartMs = Date.now();
|
|
21026
|
+
let response;
|
|
21027
|
+
try {
|
|
21028
|
+
response = await this.getTaskDefinitionCreateClient().send(new RegisterTaskDefinitionCommand({
|
|
21029
|
+
family,
|
|
21030
|
+
containerDefinitions: this.convertContainerDefinitions(properties["ContainerDefinitions"]),
|
|
21031
|
+
cpu: properties["Cpu"],
|
|
21032
|
+
memory: properties["Memory"],
|
|
21033
|
+
networkMode: properties["NetworkMode"],
|
|
21034
|
+
requiresCompatibilities: properties["RequiresCompatibilities"],
|
|
21035
|
+
executionRoleArn: properties["ExecutionRoleArn"],
|
|
21036
|
+
taskRoleArn: properties["TaskRoleArn"],
|
|
21037
|
+
volumes: this.convertVolumes(properties["Volumes"]),
|
|
21038
|
+
placementConstraints: this.convertTaskDefinitionPlacementConstraints(properties["PlacementConstraints"]),
|
|
21039
|
+
tags: convertTags(desiredTags),
|
|
21040
|
+
runtimePlatform: this.convertRuntimePlatform(properties["RuntimePlatform"]),
|
|
21041
|
+
proxyConfiguration: this.convertProxyConfiguration(properties["ProxyConfiguration"]),
|
|
21042
|
+
pidMode: properties["PidMode"],
|
|
21043
|
+
ipcMode: properties["IpcMode"],
|
|
21044
|
+
ephemeralStorage: this.convertEphemeralStorage(properties["EphemeralStorage"]),
|
|
21045
|
+
enableFaultInjection: properties["EnableFaultInjection"]
|
|
21046
|
+
}));
|
|
21047
|
+
} catch (error) {
|
|
21048
|
+
registerTaskDefinitionLatch.noteFailure(logicalId, error, attemptStartMs, orphanWindow);
|
|
21049
|
+
throw error;
|
|
21050
|
+
}
|
|
21051
|
+
const taskDef = response.taskDefinition;
|
|
20939
21052
|
if (!taskDef || !taskDef.taskDefinitionArn) throw new Error("RegisterTaskDefinition did not return task definition ARN");
|
|
21053
|
+
taskDefinitionsRegisteredByThisProcess.add(taskDef.taskDefinitionArn);
|
|
20940
21054
|
log.debug(`Successfully created ECS task definition ${logicalId}: ${taskDef.taskDefinitionArn}`);
|
|
20941
21055
|
return {
|
|
20942
21056
|
physicalId: taskDef.taskDefinitionArn,
|
|
@@ -28554,6 +28668,8 @@ const createGraphqlApiLatch = new AmbiguousCreateLatch("CreateGraphqlApi");
|
|
|
28554
28668
|
const graphqlApisCreatedByThisProcess = new RecentIdSet();
|
|
28555
28669
|
const MAX_GRAPHQL_API_LIST_PAGES = 40;
|
|
28556
28670
|
const MAX_REPORTED_ORPHAN_APIS = 5;
|
|
28671
|
+
const createApiKeyLatch = new AmbiguousCreateLatch("CreateApiKey");
|
|
28672
|
+
const apiKeysCreatedByThisProcess = new RecentIdSet();
|
|
28557
28673
|
const APPSYNC_DATASOURCE_ID_FORMAT = {
|
|
28558
28674
|
label: "AppSync DataSource",
|
|
28559
28675
|
segments: ["apiId", "name"]
|
|
@@ -29755,7 +29871,18 @@ var AppSyncProvider = class {
|
|
|
29755
29871
|
const input = { apiId };
|
|
29756
29872
|
if (properties["Description"]) input.description = properties["Description"];
|
|
29757
29873
|
if (properties["Expires"]) input.expires = properties["Expires"];
|
|
29758
|
-
|
|
29874
|
+
const orphanWindow = createApiKeyLatch.take(logicalId);
|
|
29875
|
+
if (orphanWindow !== void 0) await this.reportPossibleOrphanApiKeys(logicalId, input, orphanWindow, createMaskedLogSinks(this.logger, context?.maskSecrets));
|
|
29876
|
+
const attemptStartMs = Date.now();
|
|
29877
|
+
let response;
|
|
29878
|
+
try {
|
|
29879
|
+
response = await this.getCreateClient().send(new CreateApiKeyCommand(input));
|
|
29880
|
+
} catch (error) {
|
|
29881
|
+
createApiKeyLatch.noteFailure(logicalId, error, attemptStartMs, orphanWindow);
|
|
29882
|
+
throw error;
|
|
29883
|
+
}
|
|
29884
|
+
apiKeyId = response.apiKey.id;
|
|
29885
|
+
apiKeysCreatedByThisProcess.add(injectiveKey(apiId, apiKeyId));
|
|
29759
29886
|
this.logger.debug(`Successfully created ApiKey ${logicalId}: ${apiKeyId}`);
|
|
29760
29887
|
} catch (error) {
|
|
29761
29888
|
const cause = error instanceof Error ? error : void 0;
|
|
@@ -29780,6 +29907,31 @@ var AppSyncProvider = class {
|
|
|
29780
29907
|
}
|
|
29781
29908
|
};
|
|
29782
29909
|
}
|
|
29910
|
+
async reportPossibleOrphanApiKeys(logicalId, input, window, log) {
|
|
29911
|
+
const apiId = String(input.apiId);
|
|
29912
|
+
const description = input.description ?? "";
|
|
29913
|
+
const aws = pasteableAwsCommand(log.mask);
|
|
29914
|
+
const regionArg = await orphanCommandRegionArg(this.getClient(), aws);
|
|
29915
|
+
await reportPossibleOrphans(logicalId, window, log, {
|
|
29916
|
+
action: "CreateApiKey",
|
|
29917
|
+
service: "AppSync",
|
|
29918
|
+
listAction: "ListApiKeys",
|
|
29919
|
+
subject: `an API key on GraphQL API ${log.value(apiId)}${description === "" ? "" : ` described ${log.value(description)}`}`,
|
|
29920
|
+
noun: "API key(s)",
|
|
29921
|
+
list: () => collectOrphanIds(async (nextToken) => {
|
|
29922
|
+
const page = await this.getClient().send(new ListApiKeysCommand({
|
|
29923
|
+
apiId,
|
|
29924
|
+
maxResults: 25,
|
|
29925
|
+
...nextToken && { nextToken }
|
|
29926
|
+
}));
|
|
29927
|
+
return {
|
|
29928
|
+
items: page.apiKeys ?? [],
|
|
29929
|
+
next: page.nextToken
|
|
29930
|
+
};
|
|
29931
|
+
}, (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),
|
|
29932
|
+
inspect: () => aws`aws appsync list-api-keys --api-id ${apiId}${regionArg}`.render()
|
|
29933
|
+
});
|
|
29934
|
+
}
|
|
29783
29935
|
async deleteApiKey(logicalId, physicalId, resourceType, context) {
|
|
29784
29936
|
this.logger.debug(`Deleting ApiKey ${logicalId}: ${physicalId}`);
|
|
29785
29937
|
const [apiId, apiKeyId] = physicalId.split("|");
|
|
@@ -30526,7 +30678,6 @@ var GlueProvider = class {
|
|
|
30526
30678
|
attributes: {}
|
|
30527
30679
|
};
|
|
30528
30680
|
} 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
30681
|
const cause = error instanceof Error ? error : void 0;
|
|
30531
30682
|
throw this.wrapMaskedError(log.mask, error, (text) => new ProvisioningError(`Failed to create Glue Table ${logicalId}: ${text}`, resourceType, logicalId, void 0, cause));
|
|
30532
30683
|
}
|
|
@@ -39466,6 +39617,7 @@ function readRepoList(kind, value, side) {
|
|
|
39466
39617
|
}
|
|
39467
39618
|
var CodeCommitRepositoryProvider = class {
|
|
39468
39619
|
client;
|
|
39620
|
+
createClient;
|
|
39469
39621
|
s3Client;
|
|
39470
39622
|
providerRegion = ambientRegion();
|
|
39471
39623
|
logger = getLogger().child("CodeCommitRepositoryProvider");
|
|
@@ -39485,6 +39637,13 @@ var CodeCommitRepositoryProvider = class {
|
|
|
39485
39637
|
});
|
|
39486
39638
|
return this.client;
|
|
39487
39639
|
}
|
|
39640
|
+
getCreateClient() {
|
|
39641
|
+
if (!this.createClient) this.createClient = withoutServerErrorRetries(new CodeCommitClient({
|
|
39642
|
+
...ambientClientDefaults(),
|
|
39643
|
+
...this.providerRegion ? { region: this.providerRegion } : {}
|
|
39644
|
+
}));
|
|
39645
|
+
return this.createClient;
|
|
39646
|
+
}
|
|
39488
39647
|
getS3Client() {
|
|
39489
39648
|
if (!this.s3Client) this.s3Client = new S3Client({
|
|
39490
39649
|
...ambientClientDefaults(),
|
|
@@ -39513,7 +39672,7 @@ var CodeCommitRepositoryProvider = class {
|
|
|
39513
39672
|
const tags = toSdkTagMap(lists.Tags);
|
|
39514
39673
|
const description = properties["RepositoryDescription"];
|
|
39515
39674
|
const kmsKeyId = properties["KmsKeyId"];
|
|
39516
|
-
const metadata = (await this.
|
|
39675
|
+
const metadata = (await this.getCreateClient().send(new CreateRepositoryCommand$1({
|
|
39517
39676
|
repositoryName,
|
|
39518
39677
|
...description !== void 0 ? { repositoryDescription: description } : {},
|
|
39519
39678
|
...kmsKeyId !== void 0 ? { kmsKeyId } : {},
|
|
@@ -39861,7 +40020,7 @@ var CodeCommitRepositoryProvider = class {
|
|
|
39861
40020
|
this.logger.warn(`Code.S3 object s3://${bucket}/${key} contained no files; skipping seed commit for ${repositoryName}`);
|
|
39862
40021
|
return;
|
|
39863
40022
|
}
|
|
39864
|
-
await this.
|
|
40023
|
+
await this.getCreateClient().send(new CreateCommitCommand({
|
|
39865
40024
|
repositoryName,
|
|
39866
40025
|
branchName,
|
|
39867
40026
|
commitMessage: "Initial commit",
|
|
@@ -39883,8 +40042,11 @@ var CodeCommitRepositoryProvider = class {
|
|
|
39883
40042
|
|
|
39884
40043
|
//#endregion
|
|
39885
40044
|
//#region src/provisioning/providers/dlm-lifecycle-policy-provider.ts
|
|
40045
|
+
const createLifecyclePolicyLatch = new AmbiguousCreateLatch("dlm:CreateLifecyclePolicy");
|
|
40046
|
+
const policiesCreatedByThisProcess = new RecentIdSet();
|
|
39886
40047
|
var DLMLifecyclePolicyProvider = class {
|
|
39887
40048
|
client;
|
|
40049
|
+
createClient;
|
|
39888
40050
|
providerRegion = ambientRegion();
|
|
39889
40051
|
logger = getLogger().child("DLMLifecyclePolicyProvider");
|
|
39890
40052
|
handledProperties = /* @__PURE__ */ new Map([["AWS::DLM::LifecyclePolicy", /* @__PURE__ */ new Set([
|
|
@@ -39908,6 +40070,53 @@ var DLMLifecyclePolicyProvider = class {
|
|
|
39908
40070
|
});
|
|
39909
40071
|
return this.client;
|
|
39910
40072
|
}
|
|
40073
|
+
getCreateClient() {
|
|
40074
|
+
if (!this.createClient) this.createClient = withoutServerErrorRetries(new DLMClient({
|
|
40075
|
+
...ambientClientDefaults(),
|
|
40076
|
+
...this.providerRegion ? { region: this.providerRegion } : {}
|
|
40077
|
+
}));
|
|
40078
|
+
return this.createClient;
|
|
40079
|
+
}
|
|
40080
|
+
async reportPossibleOrphanPolicies(logicalId, input, window, log) {
|
|
40081
|
+
const description = input.Description ?? "";
|
|
40082
|
+
const isDefault = input.DefaultPolicy != null;
|
|
40083
|
+
const kind = isDefault ? "a default lifecycle policy" : "a lifecycle policy";
|
|
40084
|
+
const aws = pasteableAwsCommand(log.mask);
|
|
40085
|
+
const regionArg = await orphanCommandRegionArg(this.getClient(), aws);
|
|
40086
|
+
await reportPossibleOrphans(logicalId, window, log, {
|
|
40087
|
+
action: "CreateLifecyclePolicy",
|
|
40088
|
+
service: "DLM",
|
|
40089
|
+
listAction: "GetLifecyclePolicies",
|
|
40090
|
+
subject: description === "" ? `${kind} with no description` : `${kind} described ${log.value(description)}`,
|
|
40091
|
+
noun: "lifecycle policy(ies)",
|
|
40092
|
+
list: async () => {
|
|
40093
|
+
const page = await this.getClient().send(new GetLifecyclePoliciesCommand({}));
|
|
40094
|
+
const ids = [];
|
|
40095
|
+
for (const summary of page.Policies ?? []) {
|
|
40096
|
+
const id = summary.PolicyId;
|
|
40097
|
+
if (!id || (summary.Description ?? "") !== description || summary.DefaultPolicy === true !== isDefault || policiesCreatedByThisProcess.has(id)) continue;
|
|
40098
|
+
let created;
|
|
40099
|
+
let defaultType;
|
|
40100
|
+
try {
|
|
40101
|
+
const detail = await this.getClient().send(new GetLifecyclePolicyCommand$1({ PolicyId: id }));
|
|
40102
|
+
created = detail.Policy?.DateCreated;
|
|
40103
|
+
defaultType = detail.Policy?.PolicyDetails?.ResourceType;
|
|
40104
|
+
} catch (error) {
|
|
40105
|
+
if (error instanceof ResourceNotFoundException$14) continue;
|
|
40106
|
+
throw error;
|
|
40107
|
+
}
|
|
40108
|
+
if (isDefault && defaultType !== void 0 && defaultType !== input.DefaultPolicy) continue;
|
|
40109
|
+
if (isInsideWindow(created, window)) ids.push(id);
|
|
40110
|
+
}
|
|
40111
|
+
return {
|
|
40112
|
+
ids,
|
|
40113
|
+
truncated: false
|
|
40114
|
+
};
|
|
40115
|
+
},
|
|
40116
|
+
inspect: (id) => aws`aws dlm get-lifecycle-policy --policy-id ${id}${regionArg}`.render(),
|
|
40117
|
+
remove: (id) => aws`aws dlm delete-lifecycle-policy --policy-id ${id}${regionArg}`.render()
|
|
40118
|
+
});
|
|
40119
|
+
}
|
|
39911
40120
|
toSdkFields(properties) {
|
|
39912
40121
|
return {
|
|
39913
40122
|
...properties["ExecutionRoleArn"] != null && { ExecutionRoleArn: properties["ExecutionRoleArn"] },
|
|
@@ -39949,23 +40158,34 @@ var DLMLifecyclePolicyProvider = class {
|
|
|
39949
40158
|
async fetchPolicyArn(policyId) {
|
|
39950
40159
|
return (await this.getClient().send(new GetLifecyclePolicyCommand$1({ PolicyId: policyId }))).Policy?.PolicyArn ?? "";
|
|
39951
40160
|
}
|
|
39952
|
-
async create(logicalId, resourceType, properties) {
|
|
40161
|
+
async create(logicalId, resourceType, properties, context) {
|
|
39953
40162
|
this.logger.debug(`Creating DLM Lifecycle Policy ${logicalId}`);
|
|
39954
40163
|
const desiredTags = refuseMalformedDesiredTags(properties["Tags"], resourceType, logicalId);
|
|
40164
|
+
const log = createMaskedLogSinks(this.logger, context?.maskSecrets);
|
|
39955
40165
|
try {
|
|
39956
40166
|
const tags = desiredTags.length > 0 ? Object.fromEntries(desiredTags.map((t) => [t.Key, t.Value])) : void 0;
|
|
39957
40167
|
const input = {
|
|
39958
40168
|
...this.toSdkFields(properties),
|
|
39959
|
-
...properties["DefaultPolicy"]
|
|
40169
|
+
...properties["DefaultPolicy"] != null && { DefaultPolicy: properties["DefaultPolicy"] },
|
|
39960
40170
|
...tags && { Tags: tags }
|
|
39961
40171
|
};
|
|
39962
|
-
const
|
|
40172
|
+
const orphanWindow = createLifecyclePolicyLatch.take(logicalId);
|
|
40173
|
+
if (orphanWindow !== void 0) await this.reportPossibleOrphanPolicies(logicalId, input, orphanWindow, log);
|
|
40174
|
+
const attemptStartMs = Date.now();
|
|
40175
|
+
let response;
|
|
40176
|
+
try {
|
|
40177
|
+
response = await this.getCreateClient().send(new CreateLifecyclePolicyCommand(input));
|
|
40178
|
+
} catch (error) {
|
|
40179
|
+
createLifecyclePolicyLatch.noteFailure(logicalId, error, attemptStartMs, orphanWindow);
|
|
40180
|
+
throw error;
|
|
40181
|
+
}
|
|
39963
40182
|
if (!response.PolicyId) throw new Error("CreateLifecyclePolicy did not return a PolicyId");
|
|
40183
|
+
policiesCreatedByThisProcess.add(response.PolicyId);
|
|
39964
40184
|
let arn = "";
|
|
39965
40185
|
try {
|
|
39966
40186
|
arn = await this.fetchPolicyArn(response.PolicyId);
|
|
39967
40187
|
} catch (err) {
|
|
39968
|
-
|
|
40188
|
+
log.warn(`Created DLM Lifecycle Policy ${response.PolicyId} but could not fetch its ARN: ${log.value(describeAwsFailure(err).detail)}`);
|
|
39969
40189
|
}
|
|
39970
40190
|
this.logger.debug(`Successfully created DLM Lifecycle Policy ${logicalId}: ${response.PolicyId}`);
|
|
39971
40191
|
return {
|
|
@@ -42163,4 +42383,4 @@ var ACMCertificateProvider = class {
|
|
|
42163
42383
|
|
|
42164
42384
|
//#endregion
|
|
42165
42385
|
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-
|
|
42386
|
+
//# sourceMappingURL=provider-classes-R7yvwymx.js.map
|