cdk-real-drift 0.1.11 → 0.2.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/README.md +5 -0
- package/dist/cli.js +47 -11
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -599,6 +599,11 @@ covers them. **If you never run `revert`, cdkrd needs no write permissions at al
|
|
|
599
599
|
(supplement an `AWS::MSK::Configuration` with its writeOnly `ServerProperties`
|
|
600
600
|
Kafka blob — an out-of-band `update-configuration` revision is otherwise
|
|
601
601
|
invisible),
|
|
602
|
+
`elasticbeanstalk:DescribeConfigurationSettings` (supplements an
|
|
603
|
+
`AWS::ElasticBeanstalk::Environment` with its writeOnly `OptionSettings` — the
|
|
604
|
+
full resolved option set; an out-of-band console edit to any environment option
|
|
605
|
+
is otherwise invisible, and the service-filled default options fold to
|
|
606
|
+
`atDefault`),
|
|
602
607
|
`servicediscovery:GetNamespace` (reads a Cloud Map
|
|
603
608
|
`HttpNamespace` / `PrivateDnsNamespace` / `PublicDnsNamespace` — incl. the Arn an
|
|
604
609
|
ECS Service Connect namespace `Fn::GetAtt` resolves against)
|
package/dist/cli.js
CHANGED
|
@@ -22,6 +22,7 @@ import { GetPolicyCommand, LambdaClient, ListAliasesCommand as ListAliasesComman
|
|
|
22
22
|
import { DescribeDBInstancesCommand, RDSClient } from "@aws-sdk/client-rds";
|
|
23
23
|
import { GetTopicAttributesCommand, ListSubscriptionsByTopicCommand, SNSClient, SetTopicAttributesCommand } from "@aws-sdk/client-sns";
|
|
24
24
|
import { BudgetsClient, DescribeBudgetCommand } from "@aws-sdk/client-budgets";
|
|
25
|
+
import { DescribeConfigurationSettingsCommand, ElasticBeanstalkClient, UpdateApplicationCommand, UpdateEnvironmentCommand } from "@aws-sdk/client-elastic-beanstalk";
|
|
25
26
|
import { CognitoSyncClient, GetCognitoEventsCommand, SetCognitoEventsCommand } from "@aws-sdk/client-cognito-sync";
|
|
26
27
|
import { BatchGetProjectsCommand, BatchGetReportGroupsCommand, CodeBuildClient, UpdateReportGroupCommand } from "@aws-sdk/client-codebuild";
|
|
27
28
|
import { DescribeDBClustersCommand, DescribeDBInstancesCommand as DescribeDBInstancesCommand$1, DocDBClient, ModifyDBClusterCommand, ModifyDBInstanceCommand } from "@aws-sdk/client-docdb";
|
|
@@ -49,7 +50,6 @@ import { S_BAR, S_BAR_END, S_BAR_START, S_CHECKBOX_INACTIVE, S_CHECKBOX_SELECTED
|
|
|
49
50
|
import pc from "picocolors";
|
|
50
51
|
import { MultiSelectPrompt, Prompt, isCancel as isCancel$1 } from "@clack/core";
|
|
51
52
|
import { CloudFrontClient, GetDistributionConfigCommand, UpdateDistributionCommand } from "@aws-sdk/client-cloudfront";
|
|
52
|
-
import { ElasticBeanstalkClient, UpdateApplicationCommand, UpdateEnvironmentCommand } from "@aws-sdk/client-elastic-beanstalk";
|
|
53
53
|
import { DescribeDomainConfigCommand, OpenSearchClient, UpdateDomainConfigCommand } from "@aws-sdk/client-opensearch";
|
|
54
54
|
import { GetWebACLCommand, UpdateWebACLCommand, WAFV2Client } from "@aws-sdk/client-wafv2";
|
|
55
55
|
import { ConfigServiceClient, DescribeConfigRulesCommand, PutConfigRuleCommand } from "@aws-sdk/client-config-service";
|
|
@@ -1983,7 +1983,7 @@ const EB_OPTION_DEFAULTS = {
|
|
|
1983
1983
|
"aws:elasticbeanstalk:control|RollbackLaunchOnFailure": "false",
|
|
1984
1984
|
"aws:elasticbeanstalk:environment:proxy|ProxyServer": "nginx",
|
|
1985
1985
|
"aws:elasticbeanstalk:environment|LoadBalancerType": "classic",
|
|
1986
|
-
"aws:elasticbeanstalk:
|
|
1986
|
+
"aws:elasticbeanstalk:environment|ServiceRole": "AWSServiceRoleForElasticBeanstalk",
|
|
1987
1987
|
"aws:elasticbeanstalk:healthreporting:system|HealthCheckSuccessThreshold": "Ok",
|
|
1988
1988
|
"aws:elasticbeanstalk:healthreporting:system|SystemType": "enhanced",
|
|
1989
1989
|
"aws:elasticbeanstalk:hostmanager|LogPublicationControl": "false",
|
|
@@ -2009,7 +2009,18 @@ const EB_OPTION_DEFAULTS = {
|
|
|
2009
2009
|
"aws:elb:policies|ConnectionDrainingEnabled": "false",
|
|
2010
2010
|
"aws:elb:policies|ConnectionDrainingTimeout": "20",
|
|
2011
2011
|
"aws:elb:policies|ConnectionSettingIdleTimeout": "60",
|
|
2012
|
-
"aws:rds:dbinstance|HasCoupledDatabase": "false"
|
|
2012
|
+
"aws:rds:dbinstance|HasCoupledDatabase": "false",
|
|
2013
|
+
"aws:elasticbeanstalk:container:python|NumProcesses": "1",
|
|
2014
|
+
"aws:elasticbeanstalk:container:python|NumThreads": "15",
|
|
2015
|
+
"aws:elasticbeanstalk:container:python|WSGIPath": "application",
|
|
2016
|
+
"aws:elasticbeanstalk:application:environment|GRADLE_HOME": "/usr/local/gradle",
|
|
2017
|
+
"aws:elasticbeanstalk:application:environment|M2": "/usr/local/apache-maven/bin",
|
|
2018
|
+
"aws:elasticbeanstalk:application:environment|M2_HOME": "/usr/local/apache-maven",
|
|
2019
|
+
"aws:elasticbeanstalk:container:php:phpini|allow_url_fopen": "On",
|
|
2020
|
+
"aws:elasticbeanstalk:container:php:phpini|display_errors": "Off",
|
|
2021
|
+
"aws:elasticbeanstalk:container:php:phpini|max_execution_time": "60",
|
|
2022
|
+
"aws:elasticbeanstalk:container:php:phpini|memory_limit": "256M",
|
|
2023
|
+
"aws:elasticbeanstalk:container:php:phpini|zlib.output_compression": "Off"
|
|
2013
2024
|
};
|
|
2014
2025
|
const EB_OPTION_DERIVED = {
|
|
2015
2026
|
"aws:autoscaling:asg|MaxSize": {
|
|
@@ -2024,15 +2035,20 @@ const EB_OPTION_DERIVED = {
|
|
|
2024
2035
|
const EB_OPTION_VALUE_INDEPENDENT = new Set([
|
|
2025
2036
|
"aws:autoscaling:launchconfiguration|ImageId",
|
|
2026
2037
|
"aws:autoscaling:launchconfiguration|InstanceType",
|
|
2038
|
+
"aws:autoscaling:launchconfiguration|SecurityGroups",
|
|
2039
|
+
"aws:elb:loadbalancer|SecurityGroups",
|
|
2027
2040
|
"aws:cloudformation:template:parameter|AppSource",
|
|
2028
2041
|
"aws:cloudformation:template:parameter|HooksPkgUrl",
|
|
2029
2042
|
"aws:cloudformation:template:parameter|InstanceTypeFamily",
|
|
2043
|
+
"aws:cloudformation:template:parameter|EnvironmentVariables",
|
|
2030
2044
|
"aws:ec2:instances|InstanceTypes",
|
|
2031
2045
|
"aws:ec2:instances|SupportedArchitectures",
|
|
2046
|
+
"aws:elasticbeanstalk:application:environment|PYTHONPATH",
|
|
2032
2047
|
"aws:elasticbeanstalk:healthreporting:system|ConfigDocument",
|
|
2033
|
-
"aws:
|
|
2048
|
+
"aws:elasticbeanstalk:healthreporting:system|EnhancedHealthAuthEnabled"
|
|
2034
2049
|
]);
|
|
2035
2050
|
function ebOptionSettingTier(namespace, optionName, value, envType) {
|
|
2051
|
+
if (value == null || value === "") return "atDefault";
|
|
2036
2052
|
const key = `${String(namespace)}|${String(optionName)}`;
|
|
2037
2053
|
if (EB_OPTION_VALUE_INDEPENDENT.has(key)) return "atDefault";
|
|
2038
2054
|
const derived = EB_OPTION_DERIVED[key];
|
|
@@ -3524,16 +3540,21 @@ const IAM_ATTACHMENT_SUBSET = { "AWS::IAM::ManagedPolicy": new Set([
|
|
|
3524
3540
|
"Users",
|
|
3525
3541
|
"Groups"
|
|
3526
3542
|
]) };
|
|
3527
|
-
const
|
|
3543
|
+
const ebOptionSettingsEntryTier = (entry, liveArray) => {
|
|
3544
|
+
const envEntry = (Array.isArray(liveArray) ? liveArray : []).find((e) => e && e.OptionName === "EnvironmentType");
|
|
3545
|
+
const envType = typeof envEntry?.Value === "string" ? envEntry.Value : "LoadBalanced";
|
|
3546
|
+
return ebOptionSettingTier(entry.Namespace, entry.OptionName, entry.Value, envType);
|
|
3547
|
+
};
|
|
3548
|
+
const ebOptionSettingsSubsetSpec = {
|
|
3528
3549
|
re: /(^|\.)OptionSettings$/,
|
|
3529
3550
|
keyFields: ["Namespace", "OptionName"],
|
|
3530
3551
|
ignoreFields: new Set(["ResourceName"]),
|
|
3531
|
-
entryTier:
|
|
3532
|
-
|
|
3533
|
-
|
|
3534
|
-
|
|
3535
|
-
|
|
3536
|
-
}
|
|
3552
|
+
entryTier: ebOptionSettingsEntryTier
|
|
3553
|
+
};
|
|
3554
|
+
const COMPOSITE_KEY_SUBSET_PATHS = {
|
|
3555
|
+
"AWS::ElasticBeanstalk::ConfigurationTemplate": ebOptionSettingsSubsetSpec,
|
|
3556
|
+
"AWS::ElasticBeanstalk::Environment": ebOptionSettingsSubsetSpec
|
|
3557
|
+
};
|
|
3537
3558
|
function alignCompositeKeySubset(declared, live, spec) {
|
|
3538
3559
|
if (!Array.isArray(declared) || !Array.isArray(live)) return null;
|
|
3539
3560
|
const keyOf = (e) => {
|
|
@@ -7413,7 +7434,21 @@ const supplementLexBot = async ({ physicalId, region }) => {
|
|
|
7413
7434
|
return;
|
|
7414
7435
|
}
|
|
7415
7436
|
};
|
|
7437
|
+
const supplementElasticBeanstalkEnvironment = async ({ physicalId, declared, region }) => {
|
|
7438
|
+
const envName = str$1(physicalId);
|
|
7439
|
+
const appName = str$1(declared.ApplicationName);
|
|
7440
|
+
if (!envName || !appName) return void 0;
|
|
7441
|
+
const opts = (await new ElasticBeanstalkClient({
|
|
7442
|
+
region,
|
|
7443
|
+
...READ_RETRY
|
|
7444
|
+
}).send(new DescribeConfigurationSettingsCommand({
|
|
7445
|
+
ApplicationName: appName,
|
|
7446
|
+
EnvironmentName: envName
|
|
7447
|
+
}))).ConfigurationSettings?.[0]?.OptionSettings;
|
|
7448
|
+
return Array.isArray(opts) && opts.length > 0 ? { OptionSettings: opts } : void 0;
|
|
7449
|
+
};
|
|
7416
7450
|
const SDK_SUPPLEMENTS = {
|
|
7451
|
+
"AWS::ElasticBeanstalk::Environment": supplementElasticBeanstalkEnvironment,
|
|
7417
7452
|
"AWS::Lex::Bot": supplementLexBot,
|
|
7418
7453
|
"AWS::MSK::Configuration": supplementMskConfiguration,
|
|
7419
7454
|
"AWS::ElasticLoadBalancingV2::TrustStore": supplementTrustStore,
|
|
@@ -7585,6 +7620,7 @@ async function getSchemaInfo(client, resourceType) {
|
|
|
7585
7620
|
}
|
|
7586
7621
|
const OVERRIDE_READABLE_WRITEONLY = {
|
|
7587
7622
|
"AWS::EC2::LaunchTemplate": ["LaunchTemplateData"],
|
|
7623
|
+
"AWS::ElasticBeanstalk::Environment": ["OptionSettings"],
|
|
7588
7624
|
"AWS::MSK::Configuration": ["ServerProperties"],
|
|
7589
7625
|
"AWS::Cognito::IdentityPool": ["CognitoEvents"],
|
|
7590
7626
|
"AWS::SSM::Parameter": [
|