@go-to-k/cdkd 0.25.0 → 0.27.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.
Binary file
package/dist/index.js CHANGED
@@ -7886,6 +7886,33 @@ var IAMRoleProvider = class {
7886
7886
  this.logger.debug(`Added/updated ${tagsToAdd.length} tags on role ${roleName}`);
7887
7887
  }
7888
7888
  }
7889
+ /**
7890
+ * Resolve a single `Fn::GetAtt` attribute for an existing IAM role.
7891
+ *
7892
+ * CloudFormation's `AWS::IAM::Role` exposes `Arn` and `RoleId`; both are
7893
+ * available from the `GetRole` response. See:
7894
+ * https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html#aws-resource-iam-role-return-values
7895
+ *
7896
+ * Used by `cdkd orphan` to live-fetch attribute values that need to be
7897
+ * substituted into sibling references.
7898
+ */
7899
+ async getAttribute(physicalId, _resourceType, attributeName) {
7900
+ try {
7901
+ const resp = await this.iamClient.send(new GetRoleCommand({ RoleName: physicalId }));
7902
+ switch (attributeName) {
7903
+ case "Arn":
7904
+ return resp.Role?.Arn;
7905
+ case "RoleId":
7906
+ return resp.Role?.RoleId;
7907
+ default:
7908
+ return void 0;
7909
+ }
7910
+ } catch (err) {
7911
+ if (err instanceof NoSuchEntityException)
7912
+ return void 0;
7913
+ throw err;
7914
+ }
7915
+ }
7889
7916
  /**
7890
7917
  * Adopt an existing IAM role into cdkd state.
7891
7918
  *
@@ -8861,8 +8888,8 @@ var DeployEngine = class {
8861
8888
  const baseLabel = `${verb} ${logicalId} (${resourceType})`;
8862
8889
  renderer.addTask(logicalId, baseLabel);
8863
8890
  const operationKind = change.changeType === "CREATE" ? "CREATE" : change.changeType === "DELETE" ? "DELETE" : "UPDATE";
8864
- const warnAfterMs = this.options.resourceWarnAfterMs ?? DEFAULT_RESOURCE_WARN_AFTER_MS;
8865
- const timeoutMs = this.options.resourceTimeoutMs ?? DEFAULT_RESOURCE_TIMEOUT_MS;
8891
+ const warnAfterMs = this.options.resourceWarnAfterByType?.[resourceType] ?? this.options.resourceWarnAfterMs ?? DEFAULT_RESOURCE_WARN_AFTER_MS;
8892
+ const timeoutMs = this.options.resourceTimeoutByType?.[resourceType] ?? this.options.resourceTimeoutMs ?? DEFAULT_RESOURCE_TIMEOUT_MS;
8866
8893
  try {
8867
8894
  await withResourceDeadline(
8868
8895
  async () => {