@go-to-k/cdkd 0.44.0 → 0.45.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +221 -114
- package/dist/cli.js.map +2 -2
- package/dist/go-to-k-cdkd-0.45.0.tgz +0 -0
- package/dist/index.js.map +2 -2
- package/package.json +1 -1
- package/dist/go-to-k-cdkd-0.44.0.tgz +0 -0
package/dist/cli.js
CHANGED
|
@@ -1187,6 +1187,22 @@ var PartialFailureError = class _PartialFailureError extends CdkdError {
|
|
|
1187
1187
|
Object.setPrototypeOf(this, _PartialFailureError.prototype);
|
|
1188
1188
|
}
|
|
1189
1189
|
};
|
|
1190
|
+
var ResourceUpdateNotSupportedError = class _ResourceUpdateNotSupportedError extends CdkdError {
|
|
1191
|
+
constructor(resourceType, logicalId, suggestion, cause) {
|
|
1192
|
+
const tail = suggestion ? suggestion : "use cdkd deploy with --replace, or change the resource definition to create a new version";
|
|
1193
|
+
super(
|
|
1194
|
+
`${resourceType} (${logicalId}) cannot be updated in place: ${tail}.`,
|
|
1195
|
+
"RESOURCE_UPDATE_NOT_SUPPORTED",
|
|
1196
|
+
cause
|
|
1197
|
+
);
|
|
1198
|
+
this.resourceType = resourceType;
|
|
1199
|
+
this.logicalId = logicalId;
|
|
1200
|
+
this.suggestion = suggestion;
|
|
1201
|
+
this.name = "ResourceUpdateNotSupportedError";
|
|
1202
|
+
Object.setPrototypeOf(this, _ResourceUpdateNotSupportedError.prototype);
|
|
1203
|
+
}
|
|
1204
|
+
exitCode = 2;
|
|
1205
|
+
};
|
|
1190
1206
|
function isCdkdError(error) {
|
|
1191
1207
|
return error instanceof CdkdError;
|
|
1192
1208
|
}
|
|
@@ -21335,20 +21351,22 @@ var ApiGatewayProvider = class _ApiGatewayProvider {
|
|
|
21335
21351
|
}
|
|
21336
21352
|
}
|
|
21337
21353
|
/**
|
|
21338
|
-
* Update an API Gateway Authorizer
|
|
21354
|
+
* Update an API Gateway Authorizer.
|
|
21339
21355
|
*
|
|
21340
|
-
*
|
|
21341
|
-
*
|
|
21356
|
+
* AWS exposes `UpdateAuthorizer` (PATCH) but cdkd does not yet plumb the
|
|
21357
|
+
* patch-operations builder through. Authorizers are recreated by the
|
|
21358
|
+
* deploy engine's immutable-property replacement path. `cdkd drift
|
|
21359
|
+
* --revert` surfaces a clear "use --replace or re-deploy" message
|
|
21360
|
+
* instead of silently no-op'ing the revert.
|
|
21342
21361
|
*/
|
|
21343
|
-
updateAuthorizer(logicalId,
|
|
21344
|
-
|
|
21345
|
-
|
|
21346
|
-
|
|
21347
|
-
|
|
21348
|
-
|
|
21349
|
-
|
|
21350
|
-
|
|
21351
|
-
});
|
|
21362
|
+
updateAuthorizer(logicalId, _physicalId, _resourceType) {
|
|
21363
|
+
return Promise.reject(
|
|
21364
|
+
new ResourceUpdateNotSupportedError(
|
|
21365
|
+
"AWS::ApiGateway::Authorizer",
|
|
21366
|
+
logicalId,
|
|
21367
|
+
"API Gateway Authorizer updates are not yet implemented in cdkd; re-deploy with cdkd deploy --replace, or destroy + redeploy the stack"
|
|
21368
|
+
)
|
|
21369
|
+
);
|
|
21352
21370
|
}
|
|
21353
21371
|
/**
|
|
21354
21372
|
* Delete an API Gateway Authorizer
|
|
@@ -21580,20 +21598,20 @@ var ApiGatewayProvider = class _ApiGatewayProvider {
|
|
|
21580
21598
|
}
|
|
21581
21599
|
}
|
|
21582
21600
|
/**
|
|
21583
|
-
* Update an API Gateway Deployment
|
|
21601
|
+
* Update an API Gateway Deployment.
|
|
21584
21602
|
*
|
|
21585
|
-
* Deployments are immutable
|
|
21586
|
-
*
|
|
21603
|
+
* Deployments are immutable — every property change requires a fresh
|
|
21604
|
+
* Deployment. `cdkd drift --revert` therefore throws
|
|
21605
|
+
* `ResourceUpdateNotSupportedError` instead of silently no-op'ing.
|
|
21587
21606
|
*/
|
|
21588
|
-
updateDeployment(logicalId,
|
|
21589
|
-
|
|
21590
|
-
|
|
21591
|
-
|
|
21592
|
-
|
|
21593
|
-
|
|
21594
|
-
|
|
21595
|
-
|
|
21596
|
-
});
|
|
21607
|
+
updateDeployment(logicalId, _physicalId, _resourceType) {
|
|
21608
|
+
return Promise.reject(
|
|
21609
|
+
new ResourceUpdateNotSupportedError(
|
|
21610
|
+
"AWS::ApiGateway::Deployment",
|
|
21611
|
+
logicalId,
|
|
21612
|
+
"API Gateway Deployment is immutable; re-deploy with cdkd deploy --replace, or change the resource definition to create a new Deployment"
|
|
21613
|
+
)
|
|
21614
|
+
);
|
|
21597
21615
|
}
|
|
21598
21616
|
/**
|
|
21599
21617
|
* Delete an API Gateway Deployment
|
|
@@ -21894,17 +21912,22 @@ var ApiGatewayProvider = class _ApiGatewayProvider {
|
|
|
21894
21912
|
}
|
|
21895
21913
|
}
|
|
21896
21914
|
/**
|
|
21897
|
-
* Update an API Gateway Method
|
|
21915
|
+
* Update an API Gateway Method.
|
|
21898
21916
|
*
|
|
21899
|
-
*
|
|
21917
|
+
* AWS exposes `UpdateMethod` (PATCH) but cdkd does not yet plumb the
|
|
21918
|
+
* patch-operations builder through. Methods are recreated by the deploy
|
|
21919
|
+
* engine's immutable-property replacement path. `cdkd drift --revert`
|
|
21920
|
+
* surfaces a clear "use --replace or re-deploy" message instead of
|
|
21921
|
+
* silently no-op'ing the revert.
|
|
21900
21922
|
*/
|
|
21901
|
-
updateMethod(logicalId,
|
|
21902
|
-
|
|
21903
|
-
|
|
21904
|
-
|
|
21905
|
-
|
|
21906
|
-
|
|
21907
|
-
|
|
21923
|
+
updateMethod(logicalId, _physicalId) {
|
|
21924
|
+
return Promise.reject(
|
|
21925
|
+
new ResourceUpdateNotSupportedError(
|
|
21926
|
+
"AWS::ApiGateway::Method",
|
|
21927
|
+
logicalId,
|
|
21928
|
+
"API Gateway Method updates are not yet implemented in cdkd; re-deploy with cdkd deploy --replace, or destroy + redeploy the stack"
|
|
21929
|
+
)
|
|
21930
|
+
);
|
|
21908
21931
|
}
|
|
21909
21932
|
/**
|
|
21910
21933
|
* Delete an API Gateway Method
|
|
@@ -22282,13 +22305,23 @@ var ApiGatewayV2Provider = class {
|
|
|
22282
22305
|
);
|
|
22283
22306
|
}
|
|
22284
22307
|
}
|
|
22285
|
-
|
|
22286
|
-
|
|
22287
|
-
|
|
22288
|
-
|
|
22289
|
-
|
|
22290
|
-
|
|
22291
|
-
|
|
22308
|
+
/**
|
|
22309
|
+
* HTTP API resources are treated as immutable by cdkd: the deploy engine
|
|
22310
|
+
* recreates them on property changes via the immutable-property
|
|
22311
|
+
* replacement path. AWS does expose `UpdateApi` / `UpdateRoute` /
|
|
22312
|
+
* `UpdateIntegration` / `UpdateStage` / `UpdateAuthorizer`, but cdkd
|
|
22313
|
+
* does not yet plumb them through. `cdkd drift --revert` surfaces a
|
|
22314
|
+
* clear "use --replace or re-deploy" message instead of silently
|
|
22315
|
+
* no-op'ing the revert.
|
|
22316
|
+
*/
|
|
22317
|
+
update(logicalId, _physicalId, resourceType, _properties, _previousProperties) {
|
|
22318
|
+
return Promise.reject(
|
|
22319
|
+
new ResourceUpdateNotSupportedError(
|
|
22320
|
+
resourceType,
|
|
22321
|
+
logicalId,
|
|
22322
|
+
"API Gateway V2 (HTTP API) resources are recreated on property changes; re-deploy with cdkd deploy --replace, or destroy + redeploy the stack"
|
|
22323
|
+
)
|
|
22324
|
+
);
|
|
22292
22325
|
}
|
|
22293
22326
|
async delete(logicalId, physicalId, resourceType, properties, context) {
|
|
22294
22327
|
switch (resourceType) {
|
|
@@ -22964,6 +22997,7 @@ import {
|
|
|
22964
22997
|
CreateCloudFrontOriginAccessIdentityCommand,
|
|
22965
22998
|
DeleteCloudFrontOriginAccessIdentityCommand,
|
|
22966
22999
|
GetCloudFrontOriginAccessIdentityCommand as GetCloudFrontOriginAccessIdentityCommand2,
|
|
23000
|
+
UpdateCloudFrontOriginAccessIdentityCommand,
|
|
22967
23001
|
NoSuchCloudFrontOriginAccessIdentity
|
|
22968
23002
|
} from "@aws-sdk/client-cloudfront";
|
|
22969
23003
|
init_aws_clients();
|
|
@@ -23019,17 +23053,61 @@ var CloudFrontOAIProvider = class {
|
|
|
23019
23053
|
}
|
|
23020
23054
|
}
|
|
23021
23055
|
/**
|
|
23022
|
-
* Update a CloudFront Origin Access Identity
|
|
23056
|
+
* Update a CloudFront Origin Access Identity.
|
|
23023
23057
|
*
|
|
23024
|
-
*
|
|
23025
|
-
*
|
|
23058
|
+
* Only the `Comment` field is mutable on an OAI; `CallerReference` is set
|
|
23059
|
+
* by cdkd at create time and cannot be changed. AWS exposes a single
|
|
23060
|
+
* `UpdateCloudFrontOriginAccessIdentity` call that requires the current
|
|
23061
|
+
* `ETag` (fetched via `GetCloudFrontOriginAccessIdentity`) and overwrites
|
|
23062
|
+
* the entire `CloudFrontOriginAccessIdentityConfig`.
|
|
23063
|
+
*
|
|
23064
|
+
* Used by `cdkd drift --revert` to push the cdkd-state Comment back into
|
|
23065
|
+
* AWS; on the normal deploy path this is also exercised when a user
|
|
23066
|
+
* tweaks the Comment in their CDK code.
|
|
23026
23067
|
*/
|
|
23027
|
-
update(logicalId, physicalId,
|
|
23028
|
-
this.logger.debug(`
|
|
23029
|
-
|
|
23030
|
-
|
|
23031
|
-
|
|
23032
|
-
|
|
23068
|
+
async update(logicalId, physicalId, resourceType, properties, _previousProperties) {
|
|
23069
|
+
this.logger.debug(`Updating CloudFront OAI ${logicalId}: ${physicalId}`);
|
|
23070
|
+
const config = properties["CloudFrontOriginAccessIdentityConfig"];
|
|
23071
|
+
const comment = config?.["Comment"] ?? "";
|
|
23072
|
+
try {
|
|
23073
|
+
const getResponse = await this.cloudFrontClient.send(
|
|
23074
|
+
new GetCloudFrontOriginAccessIdentityCommand2({ Id: physicalId })
|
|
23075
|
+
);
|
|
23076
|
+
const etag = getResponse.ETag;
|
|
23077
|
+
if (!etag) {
|
|
23078
|
+
throw new Error("GetCloudFrontOriginAccessIdentity did not return ETag");
|
|
23079
|
+
}
|
|
23080
|
+
await this.cloudFrontClient.send(
|
|
23081
|
+
new UpdateCloudFrontOriginAccessIdentityCommand({
|
|
23082
|
+
Id: physicalId,
|
|
23083
|
+
IfMatch: etag,
|
|
23084
|
+
CloudFrontOriginAccessIdentityConfig: {
|
|
23085
|
+
// CallerReference is immutable; preserve whatever the OAI was
|
|
23086
|
+
// created with so AWS does not reject the update.
|
|
23087
|
+
CallerReference: getResponse.CloudFrontOriginAccessIdentity?.CloudFrontOriginAccessIdentityConfig?.CallerReference ?? logicalId,
|
|
23088
|
+
Comment: comment
|
|
23089
|
+
}
|
|
23090
|
+
})
|
|
23091
|
+
);
|
|
23092
|
+
this.logger.debug(`Successfully updated CloudFront OAI ${logicalId}`);
|
|
23093
|
+
return {
|
|
23094
|
+
physicalId,
|
|
23095
|
+
wasReplaced: false,
|
|
23096
|
+
attributes: {
|
|
23097
|
+
Id: physicalId,
|
|
23098
|
+
S3CanonicalUserId: getResponse.CloudFrontOriginAccessIdentity?.S3CanonicalUserId
|
|
23099
|
+
}
|
|
23100
|
+
};
|
|
23101
|
+
} catch (error) {
|
|
23102
|
+
const cause = error instanceof Error ? error : void 0;
|
|
23103
|
+
throw new ProvisioningError(
|
|
23104
|
+
`Failed to update CloudFront OAI ${logicalId}: ${error instanceof Error ? error.message : String(error)}`,
|
|
23105
|
+
resourceType,
|
|
23106
|
+
logicalId,
|
|
23107
|
+
physicalId,
|
|
23108
|
+
cause
|
|
23109
|
+
);
|
|
23110
|
+
}
|
|
23033
23111
|
}
|
|
23034
23112
|
/**
|
|
23035
23113
|
* Delete a CloudFront Origin Access Identity
|
|
@@ -25570,34 +25648,14 @@ var ELBv2Provider = class {
|
|
|
25570
25648
|
);
|
|
25571
25649
|
}
|
|
25572
25650
|
}
|
|
25573
|
-
|
|
25574
|
-
|
|
25575
|
-
|
|
25576
|
-
|
|
25577
|
-
new DescribeLoadBalancersCommand2({ LoadBalancerArns: [physicalId] })
|
|
25578
|
-
);
|
|
25579
|
-
const lb = describeResponse.LoadBalancers?.[0];
|
|
25580
|
-
return {
|
|
25581
|
-
physicalId,
|
|
25582
|
-
wasReplaced: false,
|
|
25583
|
-
attributes: {
|
|
25584
|
-
DNSName: lb?.DNSName,
|
|
25585
|
-
CanonicalHostedZoneID: lb?.CanonicalHostedZoneId,
|
|
25586
|
-
LoadBalancerArn: physicalId,
|
|
25587
|
-
LoadBalancerFullName: physicalId.split("/").slice(1).join("/"),
|
|
25588
|
-
LoadBalancerName: lb?.LoadBalancerName
|
|
25589
|
-
}
|
|
25590
|
-
};
|
|
25591
|
-
} catch (error) {
|
|
25592
|
-
const cause = error instanceof Error ? error : void 0;
|
|
25593
|
-
throw new ProvisioningError(
|
|
25594
|
-
`Failed to update LoadBalancer ${logicalId}: ${error instanceof Error ? error.message : String(error)}`,
|
|
25595
|
-
resourceType,
|
|
25651
|
+
updateLoadBalancer(logicalId, _physicalId, _resourceType, _properties) {
|
|
25652
|
+
return Promise.reject(
|
|
25653
|
+
new ResourceUpdateNotSupportedError(
|
|
25654
|
+
"AWS::ElasticLoadBalancingV2::LoadBalancer",
|
|
25596
25655
|
logicalId,
|
|
25597
|
-
|
|
25598
|
-
|
|
25599
|
-
|
|
25600
|
-
}
|
|
25656
|
+
"ELBv2 LoadBalancer in-place updates are not yet implemented in cdkd; re-deploy with cdkd deploy --replace, or destroy + redeploy the stack"
|
|
25657
|
+
)
|
|
25658
|
+
);
|
|
25601
25659
|
}
|
|
25602
25660
|
async deleteLoadBalancer(logicalId, physicalId, resourceType, context) {
|
|
25603
25661
|
this.logger.debug(`Deleting LoadBalancer ${logicalId}: ${physicalId}`);
|
|
@@ -29590,15 +29648,14 @@ var ServiceDiscoveryProvider = class {
|
|
|
29590
29648
|
);
|
|
29591
29649
|
}
|
|
29592
29650
|
}
|
|
29593
|
-
updateNamespace(logicalId,
|
|
29594
|
-
|
|
29595
|
-
|
|
29596
|
-
|
|
29597
|
-
|
|
29598
|
-
|
|
29599
|
-
|
|
29600
|
-
|
|
29601
|
-
});
|
|
29651
|
+
updateNamespace(logicalId, _physicalId) {
|
|
29652
|
+
return Promise.reject(
|
|
29653
|
+
new ResourceUpdateNotSupportedError(
|
|
29654
|
+
"AWS::ServiceDiscovery::PrivateDnsNamespace",
|
|
29655
|
+
logicalId,
|
|
29656
|
+
"PrivateDnsNamespace updates are not yet implemented in cdkd; re-deploy with cdkd deploy --replace, or destroy + redeploy the stack"
|
|
29657
|
+
)
|
|
29658
|
+
);
|
|
29602
29659
|
}
|
|
29603
29660
|
async deleteNamespace(logicalId, physicalId, resourceType, context) {
|
|
29604
29661
|
this.logger.debug(`Deleting private DNS namespace ${logicalId}: ${physicalId}`);
|
|
@@ -29693,15 +29750,14 @@ var ServiceDiscoveryProvider = class {
|
|
|
29693
29750
|
);
|
|
29694
29751
|
}
|
|
29695
29752
|
}
|
|
29696
|
-
updateService(logicalId,
|
|
29697
|
-
|
|
29698
|
-
|
|
29699
|
-
|
|
29700
|
-
|
|
29701
|
-
|
|
29702
|
-
|
|
29703
|
-
|
|
29704
|
-
});
|
|
29753
|
+
updateService(logicalId, _physicalId) {
|
|
29754
|
+
return Promise.reject(
|
|
29755
|
+
new ResourceUpdateNotSupportedError(
|
|
29756
|
+
"AWS::ServiceDiscovery::Service",
|
|
29757
|
+
logicalId,
|
|
29758
|
+
"ServiceDiscovery Service updates are not yet implemented in cdkd; re-deploy with cdkd deploy --replace, or destroy + redeploy the stack"
|
|
29759
|
+
)
|
|
29760
|
+
);
|
|
29705
29761
|
}
|
|
29706
29762
|
async deleteService(logicalId, physicalId, resourceType, context) {
|
|
29707
29763
|
this.logger.debug(`Deleting service discovery service ${logicalId}: ${physicalId}`);
|
|
@@ -30049,9 +30105,22 @@ var AppSyncProvider = class {
|
|
|
30049
30105
|
);
|
|
30050
30106
|
}
|
|
30051
30107
|
}
|
|
30052
|
-
|
|
30053
|
-
|
|
30054
|
-
|
|
30108
|
+
/**
|
|
30109
|
+
* AppSync resources are treated as immutable by cdkd: every supported
|
|
30110
|
+
* type (`GraphQLApi`, `GraphQLSchema`, `DataSource`, `Resolver`,
|
|
30111
|
+
* `ApiKey`) is recreated on property changes via the deploy engine's
|
|
30112
|
+
* immutable-property replacement path. There is no in-place update,
|
|
30113
|
+
* so `cdkd drift --revert` surfaces a clear "use --replace or
|
|
30114
|
+
* re-deploy" message instead of silently no-op'ing the revert.
|
|
30115
|
+
*/
|
|
30116
|
+
update(logicalId, _physicalId, resourceType, _properties, _previousProperties) {
|
|
30117
|
+
return Promise.reject(
|
|
30118
|
+
new ResourceUpdateNotSupportedError(
|
|
30119
|
+
resourceType,
|
|
30120
|
+
logicalId,
|
|
30121
|
+
"AppSync resources are recreated on property changes; re-deploy with cdkd deploy --replace, or destroy + redeploy the stack"
|
|
30122
|
+
)
|
|
30123
|
+
);
|
|
30055
30124
|
}
|
|
30056
30125
|
async delete(logicalId, physicalId, resourceType, _properties, context) {
|
|
30057
30126
|
switch (resourceType) {
|
|
@@ -30788,10 +30857,11 @@ var GlueProvider = class {
|
|
|
30788
30857
|
async update(logicalId, physicalId, resourceType, properties, _previousProperties) {
|
|
30789
30858
|
switch (resourceType) {
|
|
30790
30859
|
case "AWS::Glue::Database":
|
|
30791
|
-
|
|
30792
|
-
|
|
30860
|
+
throw new ResourceUpdateNotSupportedError(
|
|
30861
|
+
resourceType,
|
|
30862
|
+
logicalId,
|
|
30863
|
+
"Glue Database updates are not yet implemented in cdkd; re-deploy with cdkd deploy --replace, or destroy + redeploy the stack"
|
|
30793
30864
|
);
|
|
30794
|
-
return { physicalId, wasReplaced: false };
|
|
30795
30865
|
case "AWS::Glue::Table":
|
|
30796
30866
|
return this.updateTable(logicalId, physicalId, resourceType, properties);
|
|
30797
30867
|
default:
|
|
@@ -32414,8 +32484,15 @@ var EFSProvider = class {
|
|
|
32414
32484
|
);
|
|
32415
32485
|
}
|
|
32416
32486
|
}
|
|
32487
|
+
/**
|
|
32488
|
+
* EFS resources are treated as immutable by cdkd's `update()`. The deploy
|
|
32489
|
+
* engine recreates them on property changes via immutable-property
|
|
32490
|
+
* detection. (AWS does expose `UpdateFileSystem` for ThroughputMode and
|
|
32491
|
+
* `ModifyMountTargetSecurityGroups` for mount-target SGs — those are
|
|
32492
|
+
* deferred to a follow-up PR.) `cdkd drift --revert` surfaces a clear
|
|
32493
|
+
* "use --replace or re-deploy" message instead of silently no-op'ing.
|
|
32494
|
+
*/
|
|
32417
32495
|
update(logicalId, physicalId, resourceType, _properties, _previousProperties) {
|
|
32418
|
-
this.logger.debug(`Update for ${resourceType} ${logicalId} (${physicalId}) - no-op, immutable`);
|
|
32419
32496
|
if (resourceType !== "AWS::EFS::FileSystem" && resourceType !== "AWS::EFS::MountTarget" && resourceType !== "AWS::EFS::AccessPoint") {
|
|
32420
32497
|
throw new ProvisioningError(
|
|
32421
32498
|
`Unsupported resource type: ${resourceType}`,
|
|
@@ -32424,7 +32501,13 @@ var EFSProvider = class {
|
|
|
32424
32501
|
physicalId
|
|
32425
32502
|
);
|
|
32426
32503
|
}
|
|
32427
|
-
return Promise.
|
|
32504
|
+
return Promise.reject(
|
|
32505
|
+
new ResourceUpdateNotSupportedError(
|
|
32506
|
+
resourceType,
|
|
32507
|
+
logicalId,
|
|
32508
|
+
"EFS resources are recreated on property changes; re-deploy with cdkd deploy --replace, or destroy + redeploy the stack"
|
|
32509
|
+
)
|
|
32510
|
+
);
|
|
32428
32511
|
}
|
|
32429
32512
|
async delete(logicalId, physicalId, resourceType, _properties, context) {
|
|
32430
32513
|
switch (resourceType) {
|
|
@@ -33241,15 +33324,21 @@ var FirehoseProvider = class {
|
|
|
33241
33324
|
}
|
|
33242
33325
|
}
|
|
33243
33326
|
/**
|
|
33244
|
-
*
|
|
33245
|
-
*
|
|
33246
|
-
*
|
|
33327
|
+
* Firehose delivery streams are treated as immutable by cdkd. Most
|
|
33328
|
+
* destination-config changes require replacement, and AWS's
|
|
33329
|
+
* `UpdateDestination` API surface is deep enough that the deploy engine's
|
|
33330
|
+
* immutable-property replacement path covers the common cases more
|
|
33331
|
+
* reliably. `cdkd drift --revert` therefore surfaces a clear "use
|
|
33332
|
+
* --replace or re-deploy" message instead of silently no-op'ing.
|
|
33247
33333
|
*/
|
|
33248
|
-
update(logicalId,
|
|
33249
|
-
|
|
33250
|
-
|
|
33334
|
+
update(logicalId, _physicalId, resourceType, _properties, _previousProperties) {
|
|
33335
|
+
return Promise.reject(
|
|
33336
|
+
new ResourceUpdateNotSupportedError(
|
|
33337
|
+
resourceType,
|
|
33338
|
+
logicalId,
|
|
33339
|
+
"Firehose delivery streams are recreated on property changes; re-deploy with cdkd deploy --replace, or destroy + redeploy the stack"
|
|
33340
|
+
)
|
|
33251
33341
|
);
|
|
33252
|
-
return Promise.resolve({ physicalId, wasReplaced: false });
|
|
33253
33342
|
}
|
|
33254
33343
|
/**
|
|
33255
33344
|
* Delete a Firehose delivery stream
|
|
@@ -38492,6 +38581,7 @@ async function runRevert(reports, providerRegistry, stateConfig, awsClients, opt
|
|
|
38492
38581
|
const owner = `${process.env["USER"] || "unknown"}@${process.env["HOSTNAME"] || "host"}:${process.pid}`;
|
|
38493
38582
|
const concurrency = Math.max(1, options.concurrency ?? 4);
|
|
38494
38583
|
let totalFailed = 0;
|
|
38584
|
+
let totalUnsupported = 0;
|
|
38495
38585
|
let totalSucceeded = 0;
|
|
38496
38586
|
for (const report of reports) {
|
|
38497
38587
|
const driftedOutcomes = report.outcomes.filter(
|
|
@@ -38529,10 +38619,17 @@ async function runRevert(reports, providerRegistry, stateConfig, awsClients, opt
|
|
|
38529
38619
|
` \u2713 ${report.stackName}/${outcome.logicalId} (${outcome.resourceType}): reverted.`
|
|
38530
38620
|
);
|
|
38531
38621
|
} catch (err) {
|
|
38622
|
+
if (err instanceof ResourceUpdateNotSupportedError) {
|
|
38623
|
+
totalUnsupported++;
|
|
38624
|
+
logger.warn(
|
|
38625
|
+
` \u2298 ${report.stackName}/${outcome.logicalId} (${outcome.resourceType}): could not revert \u2014 ${err.message}`
|
|
38626
|
+
);
|
|
38627
|
+
return;
|
|
38628
|
+
}
|
|
38532
38629
|
totalFailed++;
|
|
38533
38630
|
const msg = err instanceof Error ? err.message : String(err);
|
|
38534
38631
|
logger.error(
|
|
38535
|
-
` \u2717 ${report.stackName}/${outcome.logicalId} (${outcome.resourceType}): ${msg}`
|
|
38632
|
+
` \u2717 ${report.stackName}/${outcome.logicalId} (${outcome.resourceType}): AWS update failed \u2014 ${msg}`
|
|
38536
38633
|
);
|
|
38537
38634
|
}
|
|
38538
38635
|
});
|
|
@@ -38545,11 +38642,21 @@ async function runRevert(reports, providerRegistry, stateConfig, awsClients, opt
|
|
|
38545
38642
|
});
|
|
38546
38643
|
}
|
|
38547
38644
|
}
|
|
38645
|
+
const summaryParts = [`${totalSucceeded} reverted`];
|
|
38646
|
+
if (totalUnsupported > 0)
|
|
38647
|
+
summaryParts.push(`${totalUnsupported} update-not-supported`);
|
|
38648
|
+
if (totalFailed > 0)
|
|
38649
|
+
summaryParts.push(`${totalFailed} failed`);
|
|
38548
38650
|
logger.info(`
|
|
38549
|
-
Revert summary: ${
|
|
38550
|
-
if (
|
|
38651
|
+
Revert summary: ${summaryParts.join(", ")}.`);
|
|
38652
|
+
if (totalUnsupported > 0) {
|
|
38653
|
+
logger.warn(
|
|
38654
|
+
`${totalUnsupported} resource(s) cannot be reverted in place \u2014 re-deploy the stack with cdkd deploy --replace, or destroy + redeploy to push the cdkd-state values back into AWS.`
|
|
38655
|
+
);
|
|
38656
|
+
}
|
|
38657
|
+
if (totalFailed > 0 || totalUnsupported > 0) {
|
|
38551
38658
|
throw new PartialFailureError(
|
|
38552
|
-
`Revert completed with ${totalFailed} resource error(s). Re-run 'cdkd drift <stack>' to see the remaining drift, then 'cdkd drift <stack> --revert' to retry.`
|
|
38659
|
+
`Revert completed with ${totalFailed + totalUnsupported} resource error(s) (${totalFailed} AWS update failure(s), ${totalUnsupported} update-not-supported). Re-run 'cdkd drift <stack>' to see the remaining drift, then 'cdkd drift <stack> --revert' to retry.`
|
|
38553
38660
|
);
|
|
38554
38661
|
}
|
|
38555
38662
|
}
|
|
@@ -41896,7 +42003,7 @@ function reorderArgs(argv) {
|
|
|
41896
42003
|
}
|
|
41897
42004
|
async function main() {
|
|
41898
42005
|
const program = new Command14();
|
|
41899
|
-
program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.
|
|
42006
|
+
program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.45.0");
|
|
41900
42007
|
program.addCommand(createBootstrapCommand());
|
|
41901
42008
|
program.addCommand(createSynthCommand());
|
|
41902
42009
|
program.addCommand(createListCommand());
|