cdk-real-drift 0.9.12 → 0.9.13

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 CHANGED
@@ -3049,7 +3049,6 @@ const VALUE_INDEPENDENT_DEFAULT_TOPLEVEL_PATHS = {
3049
3049
  "PreferredBackupWindow",
3050
3050
  "EngineLifecycleSupport"
3051
3051
  ]),
3052
- "AWS::EKS::AccessEntry": new Set(["Username"]),
3053
3052
  "AWS::EKS::Cluster": new Set(["Version"]),
3054
3053
  "AWS::EKS::Addon": new Set(["AddonVersion"]),
3055
3054
  "AWS::Glue::Job": new Set(["MaxCapacity", "AllocatedCapacity"]),
@@ -5474,6 +5473,23 @@ function classifyResource(resource, liveRaw, schema, opts = {}) {
5474
5473
  ...protocolVersion === "GRPC" ? { Matcher: { GrpcCode: "12" } } : {}
5475
5474
  };
5476
5475
  }
5476
+ if (resourceType === "AWS::EKS::AccessEntry") {
5477
+ const principalArn = declared["PrincipalArn"];
5478
+ if (typeof principalArn === "string") {
5479
+ const roleMatch = /^arn:([^:]+):iam::([^:]*):role\/(.+)$/.exec(principalArn);
5480
+ let derivedUsername = principalArn;
5481
+ if (roleMatch) {
5482
+ const partition = roleMatch[1] ?? "aws";
5483
+ const acct = roleMatch[2] ?? "";
5484
+ const pathAndName = roleMatch[3] ?? "";
5485
+ derivedUsername = `arn:${partition}:sts::${acct}:assumed-role/${pathAndName.split("/").pop() ?? pathAndName}/{{SessionName}}`;
5486
+ }
5487
+ knownDef = {
5488
+ ...knownDef,
5489
+ Username: derivedUsername
5490
+ };
5491
+ }
5492
+ }
5477
5493
  const genDef = resolveGeneratedDefault(resourceType, physicalId) ?? {};
5478
5494
  let knownDefPaths = KNOWN_DEFAULT_PATHS[resourceType] ?? {};
5479
5495
  if (resourceType === "AWS::Lambda::Function" && "DurableConfig" in declared) knownDefPaths = {