cdk-real-drift 0.1.7 → 0.1.8
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 +35 -0
- package/dist/cli.js.map +1 -1
- package/package.json +2 -1
package/dist/cli.js
CHANGED
|
@@ -49,6 +49,7 @@ import { S_BAR, S_BAR_END, S_BAR_START, S_CHECKBOX_INACTIVE, S_CHECKBOX_SELECTED
|
|
|
49
49
|
import pc from "picocolors";
|
|
50
50
|
import { MultiSelectPrompt, Prompt, isCancel as isCancel$1 } from "@clack/core";
|
|
51
51
|
import { CloudFrontClient, GetDistributionConfigCommand, UpdateDistributionCommand } from "@aws-sdk/client-cloudfront";
|
|
52
|
+
import { ElasticBeanstalkClient, UpdateApplicationCommand, UpdateEnvironmentCommand } from "@aws-sdk/client-elastic-beanstalk";
|
|
52
53
|
import { DescribeDomainConfigCommand, OpenSearchClient, UpdateDomainConfigCommand } from "@aws-sdk/client-opensearch";
|
|
53
54
|
import { GetWebACLCommand, UpdateWebACLCommand, WAFV2Client } from "@aws-sdk/client-wafv2";
|
|
54
55
|
import { ConfigServiceClient, DescribeConfigRulesCommand, PutConfigRuleCommand } from "@aws-sdk/client-config-service";
|
|
@@ -9691,7 +9692,41 @@ const writeLexBotLocales = async (ctx, ops) => {
|
|
|
9691
9692
|
}
|
|
9692
9693
|
}
|
|
9693
9694
|
};
|
|
9695
|
+
const EB_APPLICATION_MODIFY_PARAMS = new Set(["Description"]);
|
|
9696
|
+
const writeElasticBeanstalkApplication = async (ctx, ops) => {
|
|
9697
|
+
const name = str(ctx.physicalId) ?? str(ctx.declared["ApplicationName"]);
|
|
9698
|
+
if (!name) throw new Error("cannot resolve Elastic Beanstalk ApplicationName for revert");
|
|
9699
|
+
const input = { ApplicationName: name };
|
|
9700
|
+
let any = false;
|
|
9701
|
+
for (const op of ops) {
|
|
9702
|
+
const top = op.path.replace(/^\//, "").split("/")[0];
|
|
9703
|
+
if (top && EB_APPLICATION_MODIFY_PARAMS.has(top)) {
|
|
9704
|
+
input[top] = op.op === "remove" ? "" : str(ctx.declared[top]) ?? "";
|
|
9705
|
+
any = true;
|
|
9706
|
+
}
|
|
9707
|
+
}
|
|
9708
|
+
if (!any) return;
|
|
9709
|
+
await new ElasticBeanstalkClient({ region: ctx.region }).send(new UpdateApplicationCommand(input));
|
|
9710
|
+
};
|
|
9711
|
+
const EB_ENVIRONMENT_MODIFY_PARAMS = new Set(["Description"]);
|
|
9712
|
+
const writeElasticBeanstalkEnvironment = async (ctx, ops) => {
|
|
9713
|
+
const name = str(ctx.physicalId) ?? str(ctx.declared["EnvironmentName"]);
|
|
9714
|
+
if (!name) throw new Error("cannot resolve Elastic Beanstalk EnvironmentName for revert");
|
|
9715
|
+
const input = { EnvironmentName: name };
|
|
9716
|
+
let any = false;
|
|
9717
|
+
for (const op of ops) {
|
|
9718
|
+
const top = op.path.replace(/^\//, "").split("/")[0];
|
|
9719
|
+
if (top && EB_ENVIRONMENT_MODIFY_PARAMS.has(top)) {
|
|
9720
|
+
input[top] = op.op === "remove" ? "" : str(ctx.declared[top]) ?? "";
|
|
9721
|
+
any = true;
|
|
9722
|
+
}
|
|
9723
|
+
}
|
|
9724
|
+
if (!any) return;
|
|
9725
|
+
await new ElasticBeanstalkClient({ region: ctx.region }).send(new UpdateEnvironmentCommand(input));
|
|
9726
|
+
};
|
|
9694
9727
|
const SDK_WRITERS = {
|
|
9728
|
+
"AWS::ElasticBeanstalk::Application": writeElasticBeanstalkApplication,
|
|
9729
|
+
"AWS::ElasticBeanstalk::Environment": writeElasticBeanstalkEnvironment,
|
|
9695
9730
|
"AWS::CodeBuild::ReportGroup": writeCodeBuildReportGroup,
|
|
9696
9731
|
"AWS::DAX::Cluster": writeDaxCluster,
|
|
9697
9732
|
"AWS::DAX::ParameterGroup": writeDaxParameterGroup,
|