cdk-real-drift 0.3.3 → 0.3.4

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
@@ -4629,7 +4629,7 @@ function classifyResource(resource, liveRaw, schema, opts = {}) {
4629
4629
  };
4630
4630
  }
4631
4631
  if (resourceType === "AWS::KMS::Key" && opts.accountId !== void 0) {
4632
- const partition = opts.region?.startsWith("cn-") ? "aws-cn" : opts.region?.startsWith("us-gov-") ? "aws-us-gov" : "aws";
4632
+ const partition = opts.region !== void 0 ? partitionForRegion(opts.region).partition : "aws";
4633
4633
  knownDef = {
4634
4634
  ...knownDef,
4635
4635
  KeyPolicy: canonicalizePolicy({
@@ -4658,7 +4658,7 @@ function classifyResource(resource, liveRaw, schema, opts = {}) {
4658
4658
  };
4659
4659
  }
4660
4660
  if (physicalId && opts.accountId !== void 0 && declared["Policy"]) {
4661
- const arnPrefix = `arn:${opts.region?.startsWith("cn-") ? "aws-cn" : opts.region?.startsWith("us-gov-") ? "aws-us-gov" : "aws"}:execute-api:${opts.region ?? ""}:${opts.accountId}:${physicalId}`;
4661
+ const arnPrefix = `arn:${opts.region !== void 0 ? partitionForRegion(opts.region).partition : "aws"}:execute-api:${opts.region ?? ""}:${opts.accountId}:${physicalId}`;
4662
4662
  declared["Policy"] = canonicalizePolicy(expandExecuteApiResources(declared["Policy"], arnPrefix));
4663
4663
  }
4664
4664
  }
@@ -5072,7 +5072,7 @@ function classifyResource(resource, liveRaw, schema, opts = {}) {
5072
5072
  }
5073
5073
  const ctxArnTemplate = CONTEXT_ARN_DEFAULTS[resourceType]?.[k];
5074
5074
  if (ctxArnTemplate !== void 0 && opts.region !== void 0 && opts.accountId !== void 0 && typeof v === "string") {
5075
- const partition = opts.region.startsWith("cn-") ? "aws-cn" : opts.region.startsWith("us-gov-") ? "aws-us-gov" : "aws";
5075
+ const partition = partitionForRegion(opts.region).partition;
5076
5076
  if (v === ctxArnTemplate.replace("{partition}", partition).replace("{region}", opts.region).replace("{accountId}", opts.accountId)) {
5077
5077
  findings.push({
5078
5078
  tier: "atDefault",