@go-to-k/cdkd 0.49.0 → 0.50.1
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 +111 -220
- package/dist/cli.js +232 -397
- package/dist/cli.js.map +2 -2
- package/dist/go-to-k-cdkd-0.50.1.tgz +0 -0
- package/dist/index.js +2 -5
- package/dist/index.js.map +2 -2
- package/package.json +1 -1
- package/dist/go-to-k-cdkd-0.49.0.tgz +0 -0
package/dist/cli.js
CHANGED
|
@@ -9130,9 +9130,7 @@ var IAMRoleProvider = class {
|
|
|
9130
9130
|
const result = {};
|
|
9131
9131
|
if (role.RoleName !== void 0)
|
|
9132
9132
|
result["RoleName"] = role.RoleName;
|
|
9133
|
-
|
|
9134
|
-
result["Description"] = role.Description;
|
|
9135
|
-
}
|
|
9133
|
+
result["Description"] = role.Description ?? "";
|
|
9136
9134
|
if (role.MaxSessionDuration !== void 0) {
|
|
9137
9135
|
result["MaxSessionDuration"] = role.MaxSessionDuration;
|
|
9138
9136
|
}
|
|
@@ -9155,8 +9153,7 @@ var IAMRoleProvider = class {
|
|
|
9155
9153
|
new ListAttachedRolePoliciesCommand({ RoleName: physicalId })
|
|
9156
9154
|
);
|
|
9157
9155
|
const arns = (attached.AttachedPolicies ?? []).map((p) => p.PolicyArn).filter((arn) => !!arn);
|
|
9158
|
-
|
|
9159
|
-
result["ManagedPolicyArns"] = arns;
|
|
9156
|
+
result["ManagedPolicyArns"] = arns;
|
|
9160
9157
|
} catch (err) {
|
|
9161
9158
|
if (!(err instanceof NoSuchEntityException))
|
|
9162
9159
|
throw err;
|
|
@@ -9962,8 +9959,7 @@ var IAMInstanceProfileProvider = class {
|
|
|
9962
9959
|
if (profile.Path !== void 0)
|
|
9963
9960
|
result["Path"] = profile.Path;
|
|
9964
9961
|
const roleNames = (profile.Roles ?? []).map((r) => r.RoleName).filter((n) => !!n);
|
|
9965
|
-
|
|
9966
|
-
result["Roles"] = roleNames;
|
|
9962
|
+
result["Roles"] = roleNames;
|
|
9967
9963
|
return result;
|
|
9968
9964
|
}
|
|
9969
9965
|
/**
|
|
@@ -11086,8 +11082,7 @@ var IAMUserGroupProvider = class {
|
|
|
11086
11082
|
new ListAttachedUserPoliciesCommand({ UserName: physicalId })
|
|
11087
11083
|
);
|
|
11088
11084
|
const arns = (attached.AttachedPolicies ?? []).map((p) => p.PolicyArn).filter((arn) => !!arn);
|
|
11089
|
-
|
|
11090
|
-
result["ManagedPolicyArns"] = arns;
|
|
11085
|
+
result["ManagedPolicyArns"] = arns;
|
|
11091
11086
|
} catch (err) {
|
|
11092
11087
|
if (!(err instanceof NoSuchEntityException4))
|
|
11093
11088
|
throw err;
|
|
@@ -11097,8 +11092,7 @@ var IAMUserGroupProvider = class {
|
|
|
11097
11092
|
new ListGroupsForUserCommand({ UserName: physicalId })
|
|
11098
11093
|
);
|
|
11099
11094
|
const names = (groups.Groups ?? []).map((g) => g.GroupName).filter((n) => !!n);
|
|
11100
|
-
|
|
11101
|
-
result["Groups"] = names;
|
|
11095
|
+
result["Groups"] = names;
|
|
11102
11096
|
} catch (err) {
|
|
11103
11097
|
if (!(err instanceof NoSuchEntityException4))
|
|
11104
11098
|
throw err;
|
|
@@ -11127,8 +11121,7 @@ var IAMUserGroupProvider = class {
|
|
|
11127
11121
|
new ListAttachedGroupPoliciesCommand({ GroupName: physicalId })
|
|
11128
11122
|
);
|
|
11129
11123
|
const arns = (attached.AttachedPolicies ?? []).map((p) => p.PolicyArn).filter((arn) => !!arn);
|
|
11130
|
-
|
|
11131
|
-
result["ManagedPolicyArns"] = arns;
|
|
11124
|
+
result["ManagedPolicyArns"] = arns;
|
|
11132
11125
|
} catch (err) {
|
|
11133
11126
|
if (!(err instanceof NoSuchEntityException4))
|
|
11134
11127
|
throw err;
|
|
@@ -12143,35 +12136,33 @@ var S3BucketProvider = class {
|
|
|
12143
12136
|
};
|
|
12144
12137
|
{
|
|
12145
12138
|
const resp = await this.s3Client.send(new GetBucketVersioningCommand({ Bucket: physicalId }));
|
|
12146
|
-
|
|
12147
|
-
result["VersioningConfiguration"] = { Status: resp.Status };
|
|
12148
|
-
}
|
|
12139
|
+
result["VersioningConfiguration"] = { Status: resp.Status ?? "Suspended" };
|
|
12149
12140
|
}
|
|
12150
12141
|
try {
|
|
12151
12142
|
const resp = await this.s3Client.send(new GetBucketEncryptionCommand({ Bucket: physicalId }));
|
|
12152
|
-
const rules = resp.ServerSideEncryptionConfiguration?.Rules;
|
|
12153
|
-
|
|
12154
|
-
|
|
12155
|
-
|
|
12156
|
-
|
|
12157
|
-
|
|
12158
|
-
|
|
12159
|
-
|
|
12160
|
-
|
|
12161
|
-
|
|
12162
|
-
|
|
12163
|
-
|
|
12164
|
-
|
|
12165
|
-
|
|
12166
|
-
|
|
12167
|
-
|
|
12168
|
-
|
|
12169
|
-
|
|
12170
|
-
};
|
|
12171
|
-
}
|
|
12143
|
+
const rules = resp.ServerSideEncryptionConfiguration?.Rules ?? [];
|
|
12144
|
+
result["BucketEncryption"] = {
|
|
12145
|
+
ServerSideEncryptionConfiguration: rules.map((rule) => {
|
|
12146
|
+
const out = {};
|
|
12147
|
+
const sse = rule.ApplyServerSideEncryptionByDefault;
|
|
12148
|
+
if (sse) {
|
|
12149
|
+
const sseOut = {};
|
|
12150
|
+
if (sse.SSEAlgorithm !== void 0)
|
|
12151
|
+
sseOut["SSEAlgorithm"] = sse.SSEAlgorithm;
|
|
12152
|
+
if (sse.KMSMasterKeyID !== void 0)
|
|
12153
|
+
sseOut["KMSMasterKeyID"] = sse.KMSMasterKeyID;
|
|
12154
|
+
out["ServerSideEncryptionByDefault"] = sseOut;
|
|
12155
|
+
}
|
|
12156
|
+
if (rule.BucketKeyEnabled !== void 0)
|
|
12157
|
+
out["BucketKeyEnabled"] = rule.BucketKeyEnabled;
|
|
12158
|
+
return out;
|
|
12159
|
+
})
|
|
12160
|
+
};
|
|
12172
12161
|
} catch (err) {
|
|
12173
12162
|
const e = err;
|
|
12174
|
-
if (e.name
|
|
12163
|
+
if (e.name === "ServerSideEncryptionConfigurationNotFoundError") {
|
|
12164
|
+
result["BucketEncryption"] = { ServerSideEncryptionConfiguration: [] };
|
|
12165
|
+
} else {
|
|
12175
12166
|
throw err;
|
|
12176
12167
|
}
|
|
12177
12168
|
}
|
|
@@ -12180,24 +12171,22 @@ var S3BucketProvider = class {
|
|
|
12180
12171
|
new GetPublicAccessBlockCommand({ Bucket: physicalId })
|
|
12181
12172
|
);
|
|
12182
12173
|
const cfg = resp.PublicAccessBlockConfiguration;
|
|
12183
|
-
|
|
12184
|
-
|
|
12185
|
-
|
|
12186
|
-
|
|
12187
|
-
|
|
12188
|
-
|
|
12189
|
-
if (cfg.IgnorePublicAcls !== void 0)
|
|
12190
|
-
out["IgnorePublicAcls"] = cfg.IgnorePublicAcls;
|
|
12191
|
-
if (cfg.RestrictPublicBuckets !== void 0) {
|
|
12192
|
-
out["RestrictPublicBuckets"] = cfg.RestrictPublicBuckets;
|
|
12193
|
-
}
|
|
12194
|
-
if (Object.keys(out).length > 0) {
|
|
12195
|
-
result["PublicAccessBlockConfiguration"] = out;
|
|
12196
|
-
}
|
|
12197
|
-
}
|
|
12174
|
+
result["PublicAccessBlockConfiguration"] = {
|
|
12175
|
+
BlockPublicAcls: cfg?.BlockPublicAcls ?? false,
|
|
12176
|
+
BlockPublicPolicy: cfg?.BlockPublicPolicy ?? false,
|
|
12177
|
+
IgnorePublicAcls: cfg?.IgnorePublicAcls ?? false,
|
|
12178
|
+
RestrictPublicBuckets: cfg?.RestrictPublicBuckets ?? false
|
|
12179
|
+
};
|
|
12198
12180
|
} catch (err) {
|
|
12199
12181
|
const e = err;
|
|
12200
|
-
if (e.name
|
|
12182
|
+
if (e.name === "NoSuchPublicAccessBlockConfiguration") {
|
|
12183
|
+
result["PublicAccessBlockConfiguration"] = {
|
|
12184
|
+
BlockPublicAcls: false,
|
|
12185
|
+
BlockPublicPolicy: false,
|
|
12186
|
+
IgnorePublicAcls: false,
|
|
12187
|
+
RestrictPublicBuckets: false
|
|
12188
|
+
};
|
|
12189
|
+
} else {
|
|
12201
12190
|
throw err;
|
|
12202
12191
|
}
|
|
12203
12192
|
}
|
|
@@ -12874,9 +12863,7 @@ var SQSQueueProvider = class {
|
|
|
12874
12863
|
"FifoThroughputLimit"
|
|
12875
12864
|
];
|
|
12876
12865
|
for (const key of str) {
|
|
12877
|
-
|
|
12878
|
-
if (v !== void 0)
|
|
12879
|
-
result[key] = v;
|
|
12866
|
+
result[key] = attributes[key] ?? "";
|
|
12880
12867
|
}
|
|
12881
12868
|
if (attributes["RedrivePolicy"]) {
|
|
12882
12869
|
try {
|
|
@@ -12884,6 +12871,8 @@ var SQSQueueProvider = class {
|
|
|
12884
12871
|
} catch {
|
|
12885
12872
|
result["RedrivePolicy"] = attributes["RedrivePolicy"];
|
|
12886
12873
|
}
|
|
12874
|
+
} else {
|
|
12875
|
+
result["RedrivePolicy"] = {};
|
|
12887
12876
|
}
|
|
12888
12877
|
try {
|
|
12889
12878
|
const tagsResp = await this.sqsClient.send(
|
|
@@ -13563,9 +13552,7 @@ var SNSTopicProvider = class {
|
|
|
13563
13552
|
"FifoThroughputScope"
|
|
13564
13553
|
];
|
|
13565
13554
|
for (const key of str) {
|
|
13566
|
-
|
|
13567
|
-
if (v !== void 0 && v !== "")
|
|
13568
|
-
result[key] = v;
|
|
13555
|
+
result[key] = attrs[key] ?? "";
|
|
13569
13556
|
}
|
|
13570
13557
|
for (const key of ["ArchivePolicy", "DataProtectionPolicy"]) {
|
|
13571
13558
|
const v = attrs[key];
|
|
@@ -14834,39 +14821,24 @@ var LambdaFunctionProvider = class {
|
|
|
14834
14821
|
result["Timeout"] = cfg.Timeout;
|
|
14835
14822
|
if (cfg.MemorySize !== void 0)
|
|
14836
14823
|
result["MemorySize"] = cfg.MemorySize;
|
|
14837
|
-
|
|
14838
|
-
|
|
14839
|
-
|
|
14840
|
-
|
|
14841
|
-
result["Environment"] = { Variables: cfg.Environment.Variables };
|
|
14842
|
-
}
|
|
14843
|
-
if (cfg.Layers && cfg.Layers.length > 0) {
|
|
14844
|
-
result["Layers"] = cfg.Layers.map((l) => l.Arn).filter((arn) => !!arn);
|
|
14845
|
-
}
|
|
14846
|
-
if (cfg.Architectures && cfg.Architectures.length > 0) {
|
|
14847
|
-
result["Architectures"] = [...cfg.Architectures];
|
|
14848
|
-
}
|
|
14824
|
+
result["Description"] = cfg.Description ?? "";
|
|
14825
|
+
result["Environment"] = { Variables: cfg.Environment?.Variables ?? {} };
|
|
14826
|
+
result["Layers"] = (cfg.Layers ?? []).map((l) => l.Arn).filter((arn) => !!arn);
|
|
14827
|
+
result["Architectures"] = cfg.Architectures ? [...cfg.Architectures] : [];
|
|
14849
14828
|
if (cfg.PackageType !== void 0)
|
|
14850
14829
|
result["PackageType"] = cfg.PackageType;
|
|
14851
|
-
|
|
14852
|
-
result["TracingConfig"] = { Mode: cfg.TracingConfig.Mode };
|
|
14853
|
-
}
|
|
14830
|
+
result["TracingConfig"] = { Mode: cfg.TracingConfig?.Mode ?? "PassThrough" };
|
|
14854
14831
|
if (cfg.EphemeralStorage?.Size !== void 0) {
|
|
14855
14832
|
result["EphemeralStorage"] = { Size: cfg.EphemeralStorage.Size };
|
|
14856
14833
|
}
|
|
14857
|
-
|
|
14858
|
-
|
|
14859
|
-
|
|
14860
|
-
|
|
14861
|
-
|
|
14862
|
-
|
|
14863
|
-
}
|
|
14864
|
-
if (cfg.VpcConfig.Ipv6AllowedForDualStack !== void 0) {
|
|
14865
|
-
vpc["Ipv6AllowedForDualStack"] = cfg.VpcConfig.Ipv6AllowedForDualStack;
|
|
14866
|
-
}
|
|
14867
|
-
if (Object.keys(vpc).length > 0)
|
|
14868
|
-
result["VpcConfig"] = vpc;
|
|
14834
|
+
const vpc = {
|
|
14835
|
+
SubnetIds: cfg.VpcConfig?.SubnetIds ? [...cfg.VpcConfig.SubnetIds] : [],
|
|
14836
|
+
SecurityGroupIds: cfg.VpcConfig?.SecurityGroupIds ? [...cfg.VpcConfig.SecurityGroupIds] : []
|
|
14837
|
+
};
|
|
14838
|
+
if (cfg.VpcConfig?.Ipv6AllowedForDualStack !== void 0) {
|
|
14839
|
+
vpc["Ipv6AllowedForDualStack"] = cfg.VpcConfig.Ipv6AllowedForDualStack;
|
|
14869
14840
|
}
|
|
14841
|
+
result["VpcConfig"] = vpc;
|
|
14870
14842
|
const tags = normalizeAwsTagsToCfn(resp.Tags);
|
|
14871
14843
|
result["Tags"] = tags;
|
|
14872
14844
|
return result;
|
|
@@ -15439,24 +15411,18 @@ var LambdaUrlProvider = class {
|
|
|
15439
15411
|
result["AuthType"] = resp.AuthType;
|
|
15440
15412
|
if (resp.InvokeMode !== void 0)
|
|
15441
15413
|
result["InvokeMode"] = resp.InvokeMode;
|
|
15442
|
-
|
|
15443
|
-
|
|
15444
|
-
|
|
15445
|
-
|
|
15446
|
-
|
|
15447
|
-
|
|
15448
|
-
|
|
15449
|
-
|
|
15450
|
-
|
|
15451
|
-
|
|
15452
|
-
if (resp.Cors.MaxAge !== void 0)
|
|
15453
|
-
cors["MaxAge"] = resp.Cors.MaxAge;
|
|
15454
|
-
if (resp.Cors.AllowCredentials !== void 0) {
|
|
15455
|
-
cors["AllowCredentials"] = resp.Cors.AllowCredentials;
|
|
15456
|
-
}
|
|
15457
|
-
if (Object.keys(cors).length > 0)
|
|
15458
|
-
result["Cors"] = cors;
|
|
15414
|
+
const cors = {
|
|
15415
|
+
AllowOrigins: resp.Cors?.AllowOrigins ? [...resp.Cors.AllowOrigins] : [],
|
|
15416
|
+
AllowMethods: resp.Cors?.AllowMethods ? [...resp.Cors.AllowMethods] : [],
|
|
15417
|
+
AllowHeaders: resp.Cors?.AllowHeaders ? [...resp.Cors.AllowHeaders] : [],
|
|
15418
|
+
ExposeHeaders: resp.Cors?.ExposeHeaders ? [...resp.Cors.ExposeHeaders] : []
|
|
15419
|
+
};
|
|
15420
|
+
if (resp.Cors?.MaxAge !== void 0)
|
|
15421
|
+
cors["MaxAge"] = resp.Cors.MaxAge;
|
|
15422
|
+
if (resp.Cors?.AllowCredentials !== void 0) {
|
|
15423
|
+
cors["AllowCredentials"] = resp.Cors.AllowCredentials;
|
|
15459
15424
|
}
|
|
15425
|
+
result["Cors"] = cors;
|
|
15460
15426
|
return result;
|
|
15461
15427
|
}
|
|
15462
15428
|
/**
|
|
@@ -15785,12 +15751,8 @@ var LambdaEventSourceMappingProvider = class {
|
|
|
15785
15751
|
if (resp.TumblingWindowInSeconds !== void 0) {
|
|
15786
15752
|
result["TumblingWindowInSeconds"] = resp.TumblingWindowInSeconds;
|
|
15787
15753
|
}
|
|
15788
|
-
|
|
15789
|
-
|
|
15790
|
-
}
|
|
15791
|
-
if (resp.SourceAccessConfigurations !== void 0 && resp.SourceAccessConfigurations.length > 0) {
|
|
15792
|
-
result["SourceAccessConfigurations"] = resp.SourceAccessConfigurations;
|
|
15793
|
-
}
|
|
15754
|
+
result["FunctionResponseTypes"] = resp.FunctionResponseTypes ? [...resp.FunctionResponseTypes] : [];
|
|
15755
|
+
result["SourceAccessConfigurations"] = resp.SourceAccessConfigurations ?? [];
|
|
15794
15756
|
if (resp.SelfManagedEventSource !== void 0) {
|
|
15795
15757
|
result["SelfManagedEventSource"] = resp.SelfManagedEventSource;
|
|
15796
15758
|
}
|
|
@@ -16410,24 +16372,17 @@ var DynamoDBTableProvider = class {
|
|
|
16410
16372
|
StreamViewType: table.StreamSpecification.StreamViewType
|
|
16411
16373
|
};
|
|
16412
16374
|
}
|
|
16413
|
-
|
|
16414
|
-
|
|
16415
|
-
|
|
16416
|
-
|
|
16417
|
-
|
|
16418
|
-
|
|
16419
|
-
|
|
16420
|
-
const sse = {};
|
|
16421
|
-
if (table.SSEDescription.Status === "ENABLED")
|
|
16422
|
-
sse["SSEEnabled"] = true;
|
|
16423
|
-
if (table.SSEDescription.KMSMasterKeyArn !== void 0) {
|
|
16424
|
-
sse["KMSMasterKeyId"] = table.SSEDescription.KMSMasterKeyArn;
|
|
16425
|
-
}
|
|
16426
|
-
if (table.SSEDescription.SSEType !== void 0)
|
|
16427
|
-
sse["SSEType"] = table.SSEDescription.SSEType;
|
|
16428
|
-
if (Object.keys(sse).length > 0)
|
|
16429
|
-
result["SSESpecification"] = sse;
|
|
16375
|
+
result["GlobalSecondaryIndexes"] = table.GlobalSecondaryIndexes ?? [];
|
|
16376
|
+
result["LocalSecondaryIndexes"] = table.LocalSecondaryIndexes ?? [];
|
|
16377
|
+
const sse = {
|
|
16378
|
+
SSEEnabled: table.SSEDescription?.Status === "ENABLED"
|
|
16379
|
+
};
|
|
16380
|
+
if (table.SSEDescription?.KMSMasterKeyArn !== void 0) {
|
|
16381
|
+
sse["KMSMasterKeyId"] = table.SSEDescription.KMSMasterKeyArn;
|
|
16430
16382
|
}
|
|
16383
|
+
if (table.SSEDescription?.SSEType !== void 0)
|
|
16384
|
+
sse["SSEType"] = table.SSEDescription.SSEType;
|
|
16385
|
+
result["SSESpecification"] = sse;
|
|
16431
16386
|
if (table.DeletionProtectionEnabled !== void 0) {
|
|
16432
16387
|
result["DeletionProtectionEnabled"] = table.DeletionProtectionEnabled;
|
|
16433
16388
|
}
|
|
@@ -16791,8 +16746,7 @@ var LogsLogGroupProvider = class {
|
|
|
16791
16746
|
const result = {};
|
|
16792
16747
|
if (found.logGroupName !== void 0)
|
|
16793
16748
|
result["LogGroupName"] = found.logGroupName;
|
|
16794
|
-
|
|
16795
|
-
result["KmsKeyId"] = found.kmsKeyId;
|
|
16749
|
+
result["KmsKeyId"] = found.kmsKeyId ?? "";
|
|
16796
16750
|
if (found.retentionInDays !== void 0) {
|
|
16797
16751
|
result["RetentionInDays"] = found.retentionInDays;
|
|
16798
16752
|
}
|
|
@@ -17545,21 +17499,16 @@ var SecretsManagerSecretProvider = class {
|
|
|
17545
17499
|
const result = {};
|
|
17546
17500
|
if (resp.Name !== void 0)
|
|
17547
17501
|
result["Name"] = resp.Name;
|
|
17548
|
-
|
|
17549
|
-
|
|
17550
|
-
|
|
17551
|
-
|
|
17552
|
-
|
|
17553
|
-
|
|
17554
|
-
|
|
17555
|
-
|
|
17556
|
-
|
|
17557
|
-
|
|
17558
|
-
if (r.KmsKeyId)
|
|
17559
|
-
out["KmsKeyId"] = r.KmsKeyId;
|
|
17560
|
-
return out;
|
|
17561
|
-
});
|
|
17562
|
-
}
|
|
17502
|
+
result["Description"] = resp.Description ?? "";
|
|
17503
|
+
result["KmsKeyId"] = resp.KmsKeyId ?? "";
|
|
17504
|
+
result["ReplicaRegions"] = (resp.ReplicationStatus ?? []).map((r) => {
|
|
17505
|
+
const out = {};
|
|
17506
|
+
if (r.Region)
|
|
17507
|
+
out["Region"] = r.Region;
|
|
17508
|
+
if (r.KmsKeyId)
|
|
17509
|
+
out["KmsKeyId"] = r.KmsKeyId;
|
|
17510
|
+
return out;
|
|
17511
|
+
});
|
|
17563
17512
|
const tags = normalizeAwsTagsToCfn(resp.Tags);
|
|
17564
17513
|
result["Tags"] = tags;
|
|
17565
17514
|
return result;
|
|
@@ -17902,16 +17851,10 @@ var SSMParameterProvider = class {
|
|
|
17902
17851
|
})
|
|
17903
17852
|
);
|
|
17904
17853
|
const meta = desc.Parameters?.[0];
|
|
17905
|
-
|
|
17906
|
-
|
|
17907
|
-
|
|
17908
|
-
|
|
17909
|
-
if (meta.AllowedPattern !== void 0 && meta.AllowedPattern !== "") {
|
|
17910
|
-
result["AllowedPattern"] = meta.AllowedPattern;
|
|
17911
|
-
}
|
|
17912
|
-
if (meta.Tier !== void 0) {
|
|
17913
|
-
result["Tier"] = meta.Tier;
|
|
17914
|
-
}
|
|
17854
|
+
result["Description"] = meta?.Description ?? "";
|
|
17855
|
+
result["AllowedPattern"] = meta?.AllowedPattern ?? "";
|
|
17856
|
+
if (meta?.Tier !== void 0) {
|
|
17857
|
+
result["Tier"] = meta.Tier;
|
|
17915
17858
|
}
|
|
17916
17859
|
} catch {
|
|
17917
17860
|
}
|
|
@@ -18295,9 +18238,7 @@ var EventBridgeRuleProvider = class {
|
|
|
18295
18238
|
const result = {};
|
|
18296
18239
|
if (resp.Name !== void 0)
|
|
18297
18240
|
result["Name"] = resp.Name;
|
|
18298
|
-
|
|
18299
|
-
result["Description"] = resp.Description;
|
|
18300
|
-
}
|
|
18241
|
+
result["Description"] = resp.Description ?? "";
|
|
18301
18242
|
if (resp.EventBusName !== void 0 && resp.EventBusName !== "default") {
|
|
18302
18243
|
result["EventBusName"] = resp.EventBusName;
|
|
18303
18244
|
}
|
|
@@ -18322,9 +18263,7 @@ var EventBridgeRuleProvider = class {
|
|
|
18322
18263
|
...eventBusName && eventBusName !== "default" ? { EventBusName: eventBusName } : {}
|
|
18323
18264
|
})
|
|
18324
18265
|
);
|
|
18325
|
-
|
|
18326
|
-
result["Targets"] = targetsResp.Targets;
|
|
18327
|
-
}
|
|
18266
|
+
result["Targets"] = targetsResp.Targets ?? [];
|
|
18328
18267
|
} catch (err) {
|
|
18329
18268
|
if (!(err instanceof ResourceNotFoundException9)) {
|
|
18330
18269
|
throw err;
|
|
@@ -18729,15 +18668,9 @@ var EventBridgeBusProvider = class {
|
|
|
18729
18668
|
const result = {};
|
|
18730
18669
|
if (resp.Name !== void 0)
|
|
18731
18670
|
result["Name"] = resp.Name;
|
|
18732
|
-
|
|
18733
|
-
|
|
18734
|
-
}
|
|
18735
|
-
if (resp.KmsKeyIdentifier !== void 0) {
|
|
18736
|
-
result["KmsKeyIdentifier"] = resp.KmsKeyIdentifier;
|
|
18737
|
-
}
|
|
18738
|
-
if (resp.DeadLetterConfig?.Arn) {
|
|
18739
|
-
result["DeadLetterConfig"] = { Arn: resp.DeadLetterConfig.Arn };
|
|
18740
|
-
}
|
|
18671
|
+
result["Description"] = resp.Description ?? "";
|
|
18672
|
+
result["KmsKeyIdentifier"] = resp.KmsKeyIdentifier ?? "";
|
|
18673
|
+
result["DeadLetterConfig"] = { Arn: resp.DeadLetterConfig?.Arn ?? "" };
|
|
18741
18674
|
if (resp.Policy) {
|
|
18742
18675
|
try {
|
|
18743
18676
|
result["Policy"] = JSON.parse(resp.Policy);
|
|
@@ -24259,9 +24192,7 @@ var AgentCoreRuntimeProvider = class {
|
|
|
24259
24192
|
if (resp.networkConfiguration !== void 0) {
|
|
24260
24193
|
result["NetworkConfiguration"] = camelToPascalCaseKeys(resp.networkConfiguration);
|
|
24261
24194
|
}
|
|
24262
|
-
|
|
24263
|
-
result["Description"] = resp.description;
|
|
24264
|
-
}
|
|
24195
|
+
result["Description"] = resp.description ?? "";
|
|
24265
24196
|
if (resp.authorizerConfiguration !== void 0) {
|
|
24266
24197
|
result["AuthorizerConfiguration"] = camelToPascalCaseKeys(resp.authorizerConfiguration);
|
|
24267
24198
|
}
|
|
@@ -24539,15 +24470,15 @@ var StepFunctionsProvider = class {
|
|
|
24539
24470
|
result["Definition"] = resp.definition;
|
|
24540
24471
|
}
|
|
24541
24472
|
}
|
|
24542
|
-
|
|
24473
|
+
{
|
|
24543
24474
|
const lc = {};
|
|
24544
|
-
if (resp.loggingConfiguration
|
|
24475
|
+
if (resp.loggingConfiguration?.level !== void 0) {
|
|
24545
24476
|
lc["Level"] = resp.loggingConfiguration.level;
|
|
24546
24477
|
}
|
|
24547
|
-
if (resp.loggingConfiguration
|
|
24478
|
+
if (resp.loggingConfiguration?.includeExecutionData !== void 0) {
|
|
24548
24479
|
lc["IncludeExecutionData"] = resp.loggingConfiguration.includeExecutionData;
|
|
24549
24480
|
}
|
|
24550
|
-
if (resp.loggingConfiguration
|
|
24481
|
+
if (resp.loggingConfiguration?.destinations) {
|
|
24551
24482
|
lc["Destinations"] = resp.loggingConfiguration.destinations.map((d) => {
|
|
24552
24483
|
const inner = {};
|
|
24553
24484
|
if (d.cloudWatchLogsLogGroup?.logGroupArn) {
|
|
@@ -24558,25 +24489,21 @@ var StepFunctionsProvider = class {
|
|
|
24558
24489
|
return inner;
|
|
24559
24490
|
});
|
|
24560
24491
|
}
|
|
24561
|
-
|
|
24562
|
-
result["LoggingConfiguration"] = lc;
|
|
24563
|
-
}
|
|
24564
|
-
if (resp.tracingConfiguration?.enabled !== void 0) {
|
|
24565
|
-
result["TracingConfiguration"] = { Enabled: resp.tracingConfiguration.enabled };
|
|
24492
|
+
result["LoggingConfiguration"] = lc;
|
|
24566
24493
|
}
|
|
24567
|
-
|
|
24494
|
+
result["TracingConfiguration"] = { Enabled: resp.tracingConfiguration?.enabled ?? false };
|
|
24495
|
+
{
|
|
24568
24496
|
const ec = {};
|
|
24569
|
-
if (resp.encryptionConfiguration
|
|
24497
|
+
if (resp.encryptionConfiguration?.type !== void 0) {
|
|
24570
24498
|
ec["Type"] = resp.encryptionConfiguration.type;
|
|
24571
24499
|
}
|
|
24572
|
-
if (resp.encryptionConfiguration
|
|
24500
|
+
if (resp.encryptionConfiguration?.kmsKeyId !== void 0) {
|
|
24573
24501
|
ec["KmsKeyId"] = resp.encryptionConfiguration.kmsKeyId;
|
|
24574
24502
|
}
|
|
24575
|
-
if (resp.encryptionConfiguration
|
|
24503
|
+
if (resp.encryptionConfiguration?.kmsDataKeyReusePeriodSeconds !== void 0) {
|
|
24576
24504
|
ec["KmsDataKeyReusePeriodSeconds"] = resp.encryptionConfiguration.kmsDataKeyReusePeriodSeconds;
|
|
24577
24505
|
}
|
|
24578
|
-
|
|
24579
|
-
result["EncryptionConfiguration"] = ec;
|
|
24506
|
+
result["EncryptionConfiguration"] = ec;
|
|
24580
24507
|
}
|
|
24581
24508
|
try {
|
|
24582
24509
|
const tagsResp = await this.getClient().send(
|
|
@@ -25460,20 +25387,14 @@ var ECSProvider = class {
|
|
|
25460
25387
|
if (!c || !c.clusterName)
|
|
25461
25388
|
return void 0;
|
|
25462
25389
|
const result = { ClusterName: c.clusterName };
|
|
25463
|
-
|
|
25464
|
-
|
|
25465
|
-
}
|
|
25466
|
-
if (c.defaultCapacityProviderStrategy && c.defaultCapacityProviderStrategy.length > 0) {
|
|
25467
|
-
result["DefaultCapacityProviderStrategy"] = c.defaultCapacityProviderStrategy;
|
|
25468
|
-
}
|
|
25390
|
+
result["CapacityProviders"] = c.capacityProviders ? [...c.capacityProviders] : [];
|
|
25391
|
+
result["DefaultCapacityProviderStrategy"] = c.defaultCapacityProviderStrategy ?? [];
|
|
25469
25392
|
if (c.configuration)
|
|
25470
25393
|
result["Configuration"] = c.configuration;
|
|
25471
|
-
|
|
25472
|
-
|
|
25473
|
-
|
|
25474
|
-
|
|
25475
|
-
}));
|
|
25476
|
-
}
|
|
25394
|
+
result["ClusterSettings"] = (c.settings ?? []).map((s) => ({
|
|
25395
|
+
Name: s.name,
|
|
25396
|
+
Value: s.value
|
|
25397
|
+
}));
|
|
25477
25398
|
const tags = normalizeAwsTagsToCfn(c.tags);
|
|
25478
25399
|
result["Tags"] = tags;
|
|
25479
25400
|
return result;
|
|
@@ -25527,23 +25448,13 @@ var ECSProvider = class {
|
|
|
25527
25448
|
}
|
|
25528
25449
|
if (s.networkConfiguration)
|
|
25529
25450
|
result["NetworkConfiguration"] = s.networkConfiguration;
|
|
25530
|
-
|
|
25531
|
-
|
|
25532
|
-
}
|
|
25533
|
-
if (s.capacityProviderStrategy && s.capacityProviderStrategy.length > 0) {
|
|
25534
|
-
result["CapacityProviderStrategy"] = s.capacityProviderStrategy;
|
|
25535
|
-
}
|
|
25451
|
+
result["LoadBalancers"] = s.loadBalancers ?? [];
|
|
25452
|
+
result["CapacityProviderStrategy"] = s.capacityProviderStrategy ?? [];
|
|
25536
25453
|
if (s.deploymentConfiguration)
|
|
25537
25454
|
result["DeploymentConfiguration"] = s.deploymentConfiguration;
|
|
25538
|
-
|
|
25539
|
-
|
|
25540
|
-
|
|
25541
|
-
if (s.placementStrategy && s.placementStrategy.length > 0) {
|
|
25542
|
-
result["PlacementStrategy"] = s.placementStrategy;
|
|
25543
|
-
}
|
|
25544
|
-
if (s.serviceRegistries && s.serviceRegistries.length > 0) {
|
|
25545
|
-
result["ServiceRegistries"] = s.serviceRegistries;
|
|
25546
|
-
}
|
|
25455
|
+
result["PlacementConstraints"] = s.placementConstraints ?? [];
|
|
25456
|
+
result["PlacementStrategy"] = s.placementStrategy ?? [];
|
|
25457
|
+
result["ServiceRegistries"] = s.serviceRegistries ?? [];
|
|
25547
25458
|
const tags = normalizeAwsTagsToCfn(s.tags);
|
|
25548
25459
|
result["Tags"] = tags;
|
|
25549
25460
|
return result;
|
|
@@ -25569,18 +25480,13 @@ var ECSProvider = class {
|
|
|
25569
25480
|
result["Memory"] = td.memory;
|
|
25570
25481
|
if (td.networkMode !== void 0)
|
|
25571
25482
|
result["NetworkMode"] = td.networkMode;
|
|
25572
|
-
|
|
25573
|
-
result["RequiresCompatibilities"] = [...td.requiresCompatibilities];
|
|
25574
|
-
}
|
|
25483
|
+
result["RequiresCompatibilities"] = td.requiresCompatibilities ? [...td.requiresCompatibilities] : [];
|
|
25575
25484
|
if (td.executionRoleArn !== void 0)
|
|
25576
25485
|
result["ExecutionRoleArn"] = td.executionRoleArn;
|
|
25577
25486
|
if (td.taskRoleArn !== void 0)
|
|
25578
25487
|
result["TaskRoleArn"] = td.taskRoleArn;
|
|
25579
|
-
|
|
25580
|
-
|
|
25581
|
-
if (td.placementConstraints && td.placementConstraints.length > 0) {
|
|
25582
|
-
result["PlacementConstraints"] = td.placementConstraints;
|
|
25583
|
-
}
|
|
25488
|
+
result["Volumes"] = td.volumes ?? [];
|
|
25489
|
+
result["PlacementConstraints"] = td.placementConstraints ?? [];
|
|
25584
25490
|
if (td.runtimePlatform)
|
|
25585
25491
|
result["RuntimePlatform"] = td.runtimePlatform;
|
|
25586
25492
|
if (td.proxyConfiguration)
|
|
@@ -25592,9 +25498,7 @@ var ECSProvider = class {
|
|
|
25592
25498
|
if (td.ephemeralStorage?.sizeInGiB !== void 0) {
|
|
25593
25499
|
result["EphemeralStorage"] = { SizeInGiB: td.ephemeralStorage.sizeInGiB };
|
|
25594
25500
|
}
|
|
25595
|
-
|
|
25596
|
-
result["ContainerDefinitions"] = td.containerDefinitions;
|
|
25597
|
-
}
|
|
25501
|
+
result["ContainerDefinitions"] = td.containerDefinitions ?? [];
|
|
25598
25502
|
const tags = normalizeAwsTagsToCfn(resp.tags);
|
|
25599
25503
|
result["Tags"] = tags;
|
|
25600
25504
|
return result;
|
|
@@ -26260,16 +26164,9 @@ var ELBv2Provider = class {
|
|
|
26260
26164
|
const result = {};
|
|
26261
26165
|
if (lb.LoadBalancerName !== void 0)
|
|
26262
26166
|
result["Name"] = lb.LoadBalancerName;
|
|
26263
|
-
|
|
26264
|
-
|
|
26265
|
-
|
|
26266
|
-
);
|
|
26267
|
-
if (subnets.length > 0)
|
|
26268
|
-
result["Subnets"] = subnets;
|
|
26269
|
-
}
|
|
26270
|
-
if (lb.SecurityGroups && lb.SecurityGroups.length > 0) {
|
|
26271
|
-
result["SecurityGroups"] = [...lb.SecurityGroups];
|
|
26272
|
-
}
|
|
26167
|
+
const subnets = (lb.AvailabilityZones ?? []).map((az) => az.SubnetId).filter((id) => !!id);
|
|
26168
|
+
result["Subnets"] = subnets;
|
|
26169
|
+
result["SecurityGroups"] = lb.SecurityGroups ? [...lb.SecurityGroups] : [];
|
|
26273
26170
|
if (lb.Scheme !== void 0)
|
|
26274
26171
|
result["Scheme"] = lb.Scheme;
|
|
26275
26172
|
if (lb.Type !== void 0)
|
|
@@ -26326,15 +26223,12 @@ var ELBv2Provider = class {
|
|
|
26326
26223
|
if (tg.UnhealthyThresholdCount !== void 0) {
|
|
26327
26224
|
result["UnhealthyThresholdCount"] = tg.UnhealthyThresholdCount;
|
|
26328
26225
|
}
|
|
26329
|
-
|
|
26330
|
-
|
|
26331
|
-
|
|
26332
|
-
|
|
26333
|
-
|
|
26334
|
-
|
|
26335
|
-
if (Object.keys(matcher).length > 0)
|
|
26336
|
-
result["Matcher"] = matcher;
|
|
26337
|
-
}
|
|
26226
|
+
const matcher = {};
|
|
26227
|
+
if (tg.Matcher?.HttpCode !== void 0)
|
|
26228
|
+
matcher["HttpCode"] = tg.Matcher.HttpCode;
|
|
26229
|
+
if (tg.Matcher?.GrpcCode !== void 0)
|
|
26230
|
+
matcher["GrpcCode"] = tg.Matcher.GrpcCode;
|
|
26231
|
+
result["Matcher"] = matcher;
|
|
26338
26232
|
await this.attachTags(result, physicalId);
|
|
26339
26233
|
return result;
|
|
26340
26234
|
}
|
|
@@ -26362,21 +26256,17 @@ var ELBv2Provider = class {
|
|
|
26362
26256
|
result["Protocol"] = listener.Protocol;
|
|
26363
26257
|
if (listener.SslPolicy !== void 0)
|
|
26364
26258
|
result["SslPolicy"] = listener.SslPolicy;
|
|
26365
|
-
|
|
26366
|
-
|
|
26367
|
-
|
|
26368
|
-
|
|
26369
|
-
|
|
26370
|
-
|
|
26371
|
-
|
|
26372
|
-
|
|
26373
|
-
|
|
26374
|
-
|
|
26375
|
-
|
|
26376
|
-
result["DefaultActions"] = listener.DefaultActions.map(
|
|
26377
|
-
(a) => a
|
|
26378
|
-
);
|
|
26379
|
-
}
|
|
26259
|
+
result["Certificates"] = (listener.Certificates ?? []).map((c) => {
|
|
26260
|
+
const out = {};
|
|
26261
|
+
if (c.CertificateArn !== void 0)
|
|
26262
|
+
out["CertificateArn"] = c.CertificateArn;
|
|
26263
|
+
if (c.IsDefault !== void 0)
|
|
26264
|
+
out["IsDefault"] = c.IsDefault;
|
|
26265
|
+
return out;
|
|
26266
|
+
});
|
|
26267
|
+
result["DefaultActions"] = (listener.DefaultActions ?? []).map(
|
|
26268
|
+
(a) => a
|
|
26269
|
+
);
|
|
26380
26270
|
await this.attachTags(result, physicalId);
|
|
26381
26271
|
return result;
|
|
26382
26272
|
}
|
|
@@ -27223,11 +27113,7 @@ var RDSProvider = class {
|
|
|
27223
27113
|
result["DatabaseName"] = cluster.DatabaseName;
|
|
27224
27114
|
if (cluster.Port !== void 0)
|
|
27225
27115
|
result["Port"] = cluster.Port;
|
|
27226
|
-
|
|
27227
|
-
result["VpcSecurityGroupIds"] = cluster.VpcSecurityGroups.map(
|
|
27228
|
-
(sg) => sg.VpcSecurityGroupId
|
|
27229
|
-
).filter((id) => !!id);
|
|
27230
|
-
}
|
|
27116
|
+
result["VpcSecurityGroupIds"] = (cluster.VpcSecurityGroups ?? []).map((sg) => sg.VpcSecurityGroupId).filter((id) => !!id);
|
|
27231
27117
|
if (cluster.DBSubnetGroup !== void 0)
|
|
27232
27118
|
result["DBSubnetGroupName"] = cluster.DBSubnetGroup;
|
|
27233
27119
|
if (cluster.StorageEncrypted !== void 0) {
|
|
@@ -27241,16 +27127,15 @@ var RDSProvider = class {
|
|
|
27241
27127
|
if (cluster.DeletionProtection !== void 0) {
|
|
27242
27128
|
result["DeletionProtection"] = cluster.DeletionProtection;
|
|
27243
27129
|
}
|
|
27244
|
-
|
|
27130
|
+
{
|
|
27245
27131
|
const sc = {};
|
|
27246
|
-
if (cluster.ServerlessV2ScalingConfiguration
|
|
27132
|
+
if (cluster.ServerlessV2ScalingConfiguration?.MinCapacity !== void 0) {
|
|
27247
27133
|
sc["MinCapacity"] = cluster.ServerlessV2ScalingConfiguration.MinCapacity;
|
|
27248
27134
|
}
|
|
27249
|
-
if (cluster.ServerlessV2ScalingConfiguration
|
|
27135
|
+
if (cluster.ServerlessV2ScalingConfiguration?.MaxCapacity !== void 0) {
|
|
27250
27136
|
sc["MaxCapacity"] = cluster.ServerlessV2ScalingConfiguration.MaxCapacity;
|
|
27251
27137
|
}
|
|
27252
|
-
|
|
27253
|
-
result["ServerlessV2ScalingConfiguration"] = sc;
|
|
27138
|
+
result["ServerlessV2ScalingConfiguration"] = sc;
|
|
27254
27139
|
}
|
|
27255
27140
|
if (cluster.DBClusterArn)
|
|
27256
27141
|
await this.attachTags(result, cluster.DBClusterArn);
|
|
@@ -27276,11 +27161,7 @@ var RDSProvider = class {
|
|
|
27276
27161
|
if (sg.DBSubnetGroupDescription !== void 0) {
|
|
27277
27162
|
result["DBSubnetGroupDescription"] = sg.DBSubnetGroupDescription;
|
|
27278
27163
|
}
|
|
27279
|
-
|
|
27280
|
-
result["SubnetIds"] = sg.Subnets.map((s) => s.SubnetIdentifier).filter(
|
|
27281
|
-
(id) => !!id
|
|
27282
|
-
);
|
|
27283
|
-
}
|
|
27164
|
+
result["SubnetIds"] = (sg.Subnets ?? []).map((s) => s.SubnetIdentifier).filter((id) => !!id);
|
|
27284
27165
|
if (sg.DBSubnetGroupArn)
|
|
27285
27166
|
await this.attachTags(result, sg.DBSubnetGroupArn);
|
|
27286
27167
|
return result;
|
|
@@ -28119,35 +28000,30 @@ var Route53Provider = class {
|
|
|
28119
28000
|
const result = {};
|
|
28120
28001
|
if (resp.HostedZone.Name !== void 0)
|
|
28121
28002
|
result["Name"] = resp.HostedZone.Name;
|
|
28122
|
-
|
|
28123
|
-
const cfg = {
|
|
28124
|
-
|
|
28125
|
-
|
|
28126
|
-
|
|
28127
|
-
if (resp.HostedZone.Config.PrivateZone !== void 0) {
|
|
28003
|
+
{
|
|
28004
|
+
const cfg = {
|
|
28005
|
+
Comment: resp.HostedZone.Config?.Comment ?? ""
|
|
28006
|
+
};
|
|
28007
|
+
if (resp.HostedZone.Config?.PrivateZone !== void 0) {
|
|
28128
28008
|
cfg["PrivateZone"] = resp.HostedZone.Config.PrivateZone;
|
|
28129
28009
|
}
|
|
28130
|
-
|
|
28131
|
-
result["HostedZoneConfig"] = cfg;
|
|
28132
|
-
}
|
|
28133
|
-
if (resp.VPCs && resp.VPCs.length > 0) {
|
|
28134
|
-
result["VPCs"] = resp.VPCs.map((v) => {
|
|
28135
|
-
const out = {};
|
|
28136
|
-
if (v.VPCId !== void 0)
|
|
28137
|
-
out["VPCId"] = v.VPCId;
|
|
28138
|
-
if (v.VPCRegion !== void 0)
|
|
28139
|
-
out["VPCRegion"] = v.VPCRegion;
|
|
28140
|
-
return out;
|
|
28141
|
-
});
|
|
28010
|
+
result["HostedZoneConfig"] = cfg;
|
|
28142
28011
|
}
|
|
28012
|
+
result["VPCs"] = (resp.VPCs ?? []).map((v) => {
|
|
28013
|
+
const out = {};
|
|
28014
|
+
if (v.VPCId !== void 0)
|
|
28015
|
+
out["VPCId"] = v.VPCId;
|
|
28016
|
+
if (v.VPCRegion !== void 0)
|
|
28017
|
+
out["VPCRegion"] = v.VPCRegion;
|
|
28018
|
+
return out;
|
|
28019
|
+
});
|
|
28143
28020
|
const idTail = physicalId.replace(/^\/hostedzone\//, "");
|
|
28144
28021
|
try {
|
|
28145
28022
|
const tagsResp = await this.getClient().send(
|
|
28146
28023
|
new ListTagsForResourceCommand11({ ResourceType: "hostedzone", ResourceId: idTail })
|
|
28147
28024
|
);
|
|
28148
28025
|
const tags = normalizeAwsTagsToCfn(tagsResp.ResourceTagSet?.Tags);
|
|
28149
|
-
|
|
28150
|
-
result["HostedZoneTags"] = tags;
|
|
28026
|
+
result["HostedZoneTags"] = tags;
|
|
28151
28027
|
} catch (err) {
|
|
28152
28028
|
this.logger.debug(
|
|
28153
28029
|
`Route53 ListTagsForResource(${idTail}) failed: ${err instanceof Error ? err.message : String(err)}`
|
|
@@ -28187,11 +28063,7 @@ var Route53Provider = class {
|
|
|
28187
28063
|
};
|
|
28188
28064
|
if (recordSet.TTL !== void 0)
|
|
28189
28065
|
result["TTL"] = recordSet.TTL;
|
|
28190
|
-
|
|
28191
|
-
result["ResourceRecords"] = recordSet.ResourceRecords.map((r) => r.Value).filter(
|
|
28192
|
-
(v) => typeof v === "string"
|
|
28193
|
-
);
|
|
28194
|
-
}
|
|
28066
|
+
result["ResourceRecords"] = (recordSet.ResourceRecords ?? []).map((r) => r.Value).filter((v) => typeof v === "string");
|
|
28195
28067
|
if (recordSet.AliasTarget) {
|
|
28196
28068
|
const at = {};
|
|
28197
28069
|
if (recordSet.AliasTarget.HostedZoneId !== void 0) {
|
|
@@ -28229,8 +28101,7 @@ var Route53Provider = class {
|
|
|
28229
28101
|
if (recordSet.GeoLocation.SubdivisionCode !== void 0) {
|
|
28230
28102
|
geo["SubdivisionCode"] = recordSet.GeoLocation.SubdivisionCode;
|
|
28231
28103
|
}
|
|
28232
|
-
|
|
28233
|
-
result["GeoLocation"] = geo;
|
|
28104
|
+
result["GeoLocation"] = geo;
|
|
28234
28105
|
}
|
|
28235
28106
|
return result;
|
|
28236
28107
|
}
|
|
@@ -28564,30 +28435,22 @@ var WAFv2WebACLProvider = class {
|
|
|
28564
28435
|
if (webACL.Name !== void 0)
|
|
28565
28436
|
result["Name"] = webACL.Name;
|
|
28566
28437
|
result["Scope"] = scope;
|
|
28567
|
-
|
|
28568
|
-
result["Description"] = webACL.Description;
|
|
28569
|
-
}
|
|
28438
|
+
result["Description"] = webACL.Description ?? "";
|
|
28570
28439
|
if (webACL.DefaultAction) {
|
|
28571
28440
|
result["DefaultAction"] = webACL.DefaultAction;
|
|
28572
28441
|
}
|
|
28573
|
-
|
|
28574
|
-
result["Rules"] = webACL.Rules.map((r) => r);
|
|
28575
|
-
}
|
|
28442
|
+
result["Rules"] = (webACL.Rules ?? []).map((r) => r);
|
|
28576
28443
|
if (webACL.VisibilityConfig) {
|
|
28577
28444
|
result["VisibilityConfig"] = webACL.VisibilityConfig;
|
|
28578
28445
|
}
|
|
28579
|
-
|
|
28580
|
-
result["CustomResponseBodies"] = webACL.CustomResponseBodies;
|
|
28581
|
-
}
|
|
28446
|
+
result["CustomResponseBodies"] = webACL.CustomResponseBodies ?? {};
|
|
28582
28447
|
if (webACL.CaptchaConfig) {
|
|
28583
28448
|
result["CaptchaConfig"] = webACL.CaptchaConfig;
|
|
28584
28449
|
}
|
|
28585
28450
|
if (webACL.ChallengeConfig) {
|
|
28586
28451
|
result["ChallengeConfig"] = webACL.ChallengeConfig;
|
|
28587
28452
|
}
|
|
28588
|
-
|
|
28589
|
-
result["TokenDomains"] = [...webACL.TokenDomains];
|
|
28590
|
-
}
|
|
28453
|
+
result["TokenDomains"] = webACL.TokenDomains ? [...webACL.TokenDomains] : [];
|
|
28591
28454
|
if (webACL.AssociationConfig) {
|
|
28592
28455
|
result["AssociationConfig"] = webACL.AssociationConfig;
|
|
28593
28456
|
}
|
|
@@ -29679,13 +29542,8 @@ var ElastiCacheProvider = class {
|
|
|
29679
29542
|
if (cluster.CacheNodes?.[0]?.Endpoint?.Port !== void 0) {
|
|
29680
29543
|
result["Port"] = cluster.CacheNodes[0].Endpoint.Port;
|
|
29681
29544
|
}
|
|
29682
|
-
|
|
29683
|
-
|
|
29684
|
-
(id) => !!id
|
|
29685
|
-
);
|
|
29686
|
-
if (ids.length > 0)
|
|
29687
|
-
result["VpcSecurityGroupIds"] = ids;
|
|
29688
|
-
}
|
|
29545
|
+
const sgIds = (cluster.SecurityGroups ?? []).map((sg) => sg.SecurityGroupId).filter((id) => !!id);
|
|
29546
|
+
result["VpcSecurityGroupIds"] = sgIds;
|
|
29689
29547
|
if (cluster.ARN)
|
|
29690
29548
|
await this.attachTags(result, cluster.ARN);
|
|
29691
29549
|
return result;
|
|
@@ -29711,11 +29569,8 @@ var ElastiCacheProvider = class {
|
|
|
29711
29569
|
if (group.CacheSubnetGroupDescription !== void 0) {
|
|
29712
29570
|
result["CacheSubnetGroupDescription"] = group.CacheSubnetGroupDescription;
|
|
29713
29571
|
}
|
|
29714
|
-
|
|
29715
|
-
|
|
29716
|
-
if (ids.length > 0)
|
|
29717
|
-
result["SubnetIds"] = ids;
|
|
29718
|
-
}
|
|
29572
|
+
const subnetIds = (group.Subnets ?? []).map((s) => s.SubnetIdentifier).filter((id) => !!id);
|
|
29573
|
+
result["SubnetIds"] = subnetIds;
|
|
29719
29574
|
if (group.ARN)
|
|
29720
29575
|
await this.attachTags(result, group.ARN);
|
|
29721
29576
|
return result;
|
|
@@ -30251,9 +30106,7 @@ var ServiceDiscoveryProvider = class {
|
|
|
30251
30106
|
const result = {};
|
|
30252
30107
|
if (ns.Name !== void 0)
|
|
30253
30108
|
result["Name"] = ns.Name;
|
|
30254
|
-
|
|
30255
|
-
result["Description"] = ns.Description;
|
|
30256
|
-
}
|
|
30109
|
+
result["Description"] = ns.Description ?? "";
|
|
30257
30110
|
if (ns.Arn)
|
|
30258
30111
|
await this.attachTags(result, ns.Arn);
|
|
30259
30112
|
return result;
|
|
@@ -30275,9 +30128,7 @@ var ServiceDiscoveryProvider = class {
|
|
|
30275
30128
|
result["Name"] = svc.Name;
|
|
30276
30129
|
if (svc.NamespaceId !== void 0)
|
|
30277
30130
|
result["NamespaceId"] = svc.NamespaceId;
|
|
30278
|
-
|
|
30279
|
-
result["Description"] = svc.Description;
|
|
30280
|
-
}
|
|
30131
|
+
result["Description"] = svc.Description ?? "";
|
|
30281
30132
|
if (svc.Type !== void 0)
|
|
30282
30133
|
result["Type"] = svc.Type;
|
|
30283
30134
|
if (svc.DnsConfig) {
|
|
@@ -31656,14 +31507,10 @@ var GlueProvider = class {
|
|
|
31656
31507
|
const dbInput = {};
|
|
31657
31508
|
if (db.Name !== void 0)
|
|
31658
31509
|
dbInput["Name"] = db.Name;
|
|
31659
|
-
|
|
31660
|
-
dbInput["Description"] = db.Description;
|
|
31661
|
-
}
|
|
31510
|
+
dbInput["Description"] = db.Description ?? "";
|
|
31662
31511
|
if (db.LocationUri !== void 0)
|
|
31663
31512
|
dbInput["LocationUri"] = db.LocationUri;
|
|
31664
|
-
|
|
31665
|
-
dbInput["Parameters"] = db.Parameters;
|
|
31666
|
-
}
|
|
31513
|
+
dbInput["Parameters"] = db.Parameters ?? {};
|
|
31667
31514
|
return { DatabaseInput: dbInput };
|
|
31668
31515
|
}
|
|
31669
31516
|
async readTable(physicalId) {
|
|
@@ -31686,23 +31533,17 @@ var GlueProvider = class {
|
|
|
31686
31533
|
const tableInput = {};
|
|
31687
31534
|
if (table.Name !== void 0)
|
|
31688
31535
|
tableInput["Name"] = table.Name;
|
|
31689
|
-
|
|
31690
|
-
tableInput["Description"] = table.Description;
|
|
31691
|
-
}
|
|
31536
|
+
tableInput["Description"] = table.Description ?? "";
|
|
31692
31537
|
if (table.Owner !== void 0)
|
|
31693
31538
|
tableInput["Owner"] = table.Owner;
|
|
31694
31539
|
if (table.Retention !== void 0)
|
|
31695
31540
|
tableInput["Retention"] = table.Retention;
|
|
31696
31541
|
if (table.TableType !== void 0)
|
|
31697
31542
|
tableInput["TableType"] = table.TableType;
|
|
31698
|
-
|
|
31699
|
-
|
|
31700
|
-
|
|
31701
|
-
|
|
31702
|
-
}
|
|
31703
|
-
if (table.Parameters && Object.keys(table.Parameters).length > 0) {
|
|
31704
|
-
tableInput["Parameters"] = table.Parameters;
|
|
31705
|
-
}
|
|
31543
|
+
tableInput["PartitionKeys"] = (table.PartitionKeys ?? []).map(
|
|
31544
|
+
(k) => k
|
|
31545
|
+
);
|
|
31546
|
+
tableInput["Parameters"] = table.Parameters ?? {};
|
|
31706
31547
|
if (table.StorageDescriptor) {
|
|
31707
31548
|
tableInput["StorageDescriptor"] = table.StorageDescriptor;
|
|
31708
31549
|
}
|
|
@@ -32304,9 +32145,7 @@ var KMSProvider = class {
|
|
|
32304
32145
|
if (!md)
|
|
32305
32146
|
return void 0;
|
|
32306
32147
|
const result = {};
|
|
32307
|
-
|
|
32308
|
-
result["Description"] = md.Description;
|
|
32309
|
-
}
|
|
32148
|
+
result["Description"] = md.Description ?? "";
|
|
32310
32149
|
if (md.KeySpec !== void 0)
|
|
32311
32150
|
result["KeySpec"] = md.KeySpec;
|
|
32312
32151
|
if (md.KeyUsage !== void 0)
|
|
@@ -32756,8 +32595,10 @@ var KinesisStreamProvider = class {
|
|
|
32756
32595
|
if (stream.RetentionPeriodHours !== void 0) {
|
|
32757
32596
|
result["RetentionPeriodHours"] = stream.RetentionPeriodHours;
|
|
32758
32597
|
}
|
|
32759
|
-
|
|
32760
|
-
const encryption = {
|
|
32598
|
+
{
|
|
32599
|
+
const encryption = {
|
|
32600
|
+
EncryptionType: stream.EncryptionType ?? "NONE"
|
|
32601
|
+
};
|
|
32761
32602
|
if (stream.KeyId !== void 0)
|
|
32762
32603
|
encryption["KeyId"] = stream.KeyId;
|
|
32763
32604
|
result["StreamEncryption"] = encryption;
|
|
@@ -33337,20 +33178,18 @@ var EFSProvider = class {
|
|
|
33337
33178
|
const resp = await this.getClient().send(
|
|
33338
33179
|
new DescribeLifecycleConfigurationCommand({ FileSystemId: physicalId })
|
|
33339
33180
|
);
|
|
33340
|
-
const policies = resp.LifecyclePolicies;
|
|
33341
|
-
|
|
33342
|
-
|
|
33343
|
-
|
|
33344
|
-
|
|
33345
|
-
|
|
33346
|
-
|
|
33347
|
-
|
|
33348
|
-
|
|
33349
|
-
|
|
33350
|
-
|
|
33351
|
-
|
|
33352
|
-
});
|
|
33353
|
-
}
|
|
33181
|
+
const policies = resp.LifecyclePolicies ?? [];
|
|
33182
|
+
result["LifecyclePolicies"] = policies.map((p) => {
|
|
33183
|
+
const out = {};
|
|
33184
|
+
if (p.TransitionToIA !== void 0)
|
|
33185
|
+
out["TransitionToIA"] = p.TransitionToIA;
|
|
33186
|
+
if (p.TransitionToPrimaryStorageClass !== void 0) {
|
|
33187
|
+
out["TransitionToPrimaryStorageClass"] = p.TransitionToPrimaryStorageClass;
|
|
33188
|
+
}
|
|
33189
|
+
if (p.TransitionToArchive !== void 0)
|
|
33190
|
+
out["TransitionToArchive"] = p.TransitionToArchive;
|
|
33191
|
+
return out;
|
|
33192
|
+
});
|
|
33354
33193
|
} catch (err) {
|
|
33355
33194
|
if (err instanceof FileSystemNotFound)
|
|
33356
33195
|
return void 0;
|
|
@@ -33370,8 +33209,7 @@ var EFSProvider = class {
|
|
|
33370
33209
|
return void 0;
|
|
33371
33210
|
}
|
|
33372
33211
|
const tags = normalizeAwsTagsToCfn(fs.Tags);
|
|
33373
|
-
|
|
33374
|
-
result["FileSystemTags"] = tags;
|
|
33212
|
+
result["FileSystemTags"] = tags;
|
|
33375
33213
|
return result;
|
|
33376
33214
|
}
|
|
33377
33215
|
async readAccessPoint(physicalId) {
|
|
@@ -34371,11 +34209,9 @@ var CloudTrailProvider = class {
|
|
|
34371
34209
|
const sel = await this.getClient().send(
|
|
34372
34210
|
new GetEventSelectorsCommand({ TrailName: physicalId })
|
|
34373
34211
|
);
|
|
34374
|
-
|
|
34375
|
-
|
|
34376
|
-
|
|
34377
|
-
);
|
|
34378
|
-
}
|
|
34212
|
+
result["EventSelectors"] = (sel.EventSelectors ?? []).map(
|
|
34213
|
+
(es) => es
|
|
34214
|
+
);
|
|
34379
34215
|
} catch {
|
|
34380
34216
|
}
|
|
34381
34217
|
if (trail.TrailARN) {
|
|
@@ -36406,24 +36242,17 @@ var ECRProvider = class {
|
|
|
36406
36242
|
result["RepositoryName"] = r.repositoryName;
|
|
36407
36243
|
if (r.imageTagMutability !== void 0)
|
|
36408
36244
|
result["ImageTagMutability"] = r.imageTagMutability;
|
|
36409
|
-
|
|
36410
|
-
|
|
36411
|
-
|
|
36412
|
-
|
|
36413
|
-
|
|
36414
|
-
|
|
36415
|
-
|
|
36416
|
-
|
|
36417
|
-
|
|
36418
|
-
const inner = {};
|
|
36419
|
-
if (r.encryptionConfiguration.encryptionType !== void 0) {
|
|
36420
|
-
inner["EncryptionType"] = r.encryptionConfiguration.encryptionType;
|
|
36421
|
-
}
|
|
36422
|
-
if (r.encryptionConfiguration.kmsKey !== void 0) {
|
|
36423
|
-
inner["KmsKey"] = r.encryptionConfiguration.kmsKey;
|
|
36245
|
+
result["ImageScanningConfiguration"] = {
|
|
36246
|
+
ScanOnPush: r.imageScanningConfiguration?.scanOnPush ?? false
|
|
36247
|
+
};
|
|
36248
|
+
{
|
|
36249
|
+
const enc = {
|
|
36250
|
+
EncryptionType: r.encryptionConfiguration?.encryptionType ?? "AES256"
|
|
36251
|
+
};
|
|
36252
|
+
if (r.encryptionConfiguration?.kmsKey !== void 0) {
|
|
36253
|
+
enc["KmsKey"] = r.encryptionConfiguration.kmsKey;
|
|
36424
36254
|
}
|
|
36425
|
-
|
|
36426
|
-
result["EncryptionConfiguration"] = inner;
|
|
36255
|
+
result["EncryptionConfiguration"] = enc;
|
|
36427
36256
|
}
|
|
36428
36257
|
try {
|
|
36429
36258
|
const lp = await this.getClient().send(
|
|
@@ -38666,10 +38495,11 @@ init_aws_clients();
|
|
|
38666
38495
|
function calculateResourceDrift(stateProperties, awsProperties, options) {
|
|
38667
38496
|
const drifts = [];
|
|
38668
38497
|
const ignore = options?.ignorePaths ?? [];
|
|
38498
|
+
const union = options?.unionWalkObjects ?? false;
|
|
38669
38499
|
for (const key of Object.keys(stateProperties)) {
|
|
38670
38500
|
if (isIgnoredPath(key, ignore))
|
|
38671
38501
|
continue;
|
|
38672
|
-
diffAt(key, stateProperties[key], awsProperties[key], drifts, ignore);
|
|
38502
|
+
diffAt(key, stateProperties[key], awsProperties[key], drifts, ignore, union);
|
|
38673
38503
|
}
|
|
38674
38504
|
return drifts;
|
|
38675
38505
|
}
|
|
@@ -38682,15 +38512,16 @@ function isIgnoredPath(path, ignorePaths) {
|
|
|
38682
38512
|
}
|
|
38683
38513
|
return false;
|
|
38684
38514
|
}
|
|
38685
|
-
function diffAt(path, stateValue, awsValue, out, ignorePaths) {
|
|
38515
|
+
function diffAt(path, stateValue, awsValue, out, ignorePaths, unionWalkObjects) {
|
|
38686
38516
|
if (deepEqual(stateValue, awsValue))
|
|
38687
38517
|
return;
|
|
38688
38518
|
if (isPlainObject(stateValue) && isPlainObject(awsValue) && !Array.isArray(stateValue) && !Array.isArray(awsValue)) {
|
|
38689
|
-
|
|
38519
|
+
const keys = unionWalkObjects ? /* @__PURE__ */ new Set([...Object.keys(stateValue), ...Object.keys(awsValue)]) : Object.keys(stateValue);
|
|
38520
|
+
for (const key of keys) {
|
|
38690
38521
|
const childPath = `${path}.${key}`;
|
|
38691
38522
|
if (isIgnoredPath(childPath, ignorePaths))
|
|
38692
38523
|
continue;
|
|
38693
|
-
diffAt(childPath, stateValue[key], awsValue[key], out, ignorePaths);
|
|
38524
|
+
diffAt(childPath, stateValue[key], awsValue[key], out, ignorePaths, unionWalkObjects);
|
|
38694
38525
|
}
|
|
38695
38526
|
return;
|
|
38696
38527
|
}
|
|
@@ -39069,8 +38900,12 @@ async function runDriftForStack(stackName, region, stateBackend, providerRegistr
|
|
|
39069
38900
|
continue;
|
|
39070
38901
|
}
|
|
39071
38902
|
const ignorePaths = provider.getDriftUnknownPaths ? provider.getDriftUnknownPaths(resource.resourceType) : [];
|
|
39072
|
-
const
|
|
39073
|
-
const
|
|
38903
|
+
const useObserved = resource.observedProperties !== void 0;
|
|
38904
|
+
const baseline = useObserved ? resource.observedProperties : resource.properties ?? {};
|
|
38905
|
+
const changes = calculateResourceDrift(baseline, aws, {
|
|
38906
|
+
ignorePaths,
|
|
38907
|
+
unionWalkObjects: useObserved
|
|
38908
|
+
});
|
|
39074
38909
|
if (changes.length === 0) {
|
|
39075
38910
|
outcomes.push({ kind: "clean", logicalId, resourceType: resource.resourceType });
|
|
39076
38911
|
} else {
|
|
@@ -42855,7 +42690,7 @@ function reorderArgs(argv) {
|
|
|
42855
42690
|
}
|
|
42856
42691
|
async function main() {
|
|
42857
42692
|
const program = new Command14();
|
|
42858
|
-
program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.
|
|
42693
|
+
program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.50.1");
|
|
42859
42694
|
program.addCommand(createBootstrapCommand());
|
|
42860
42695
|
program.addCommand(createSynthCommand());
|
|
42861
42696
|
program.addCommand(createListCommand());
|