@go-to-k/cdkd 0.26.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.
- package/dist/cli.js +279 -22
- package/dist/cli.js.map +3 -3
- package/dist/go-to-k-cdkd-0.27.0.tgz +0 -0
- package/dist/index.js +27 -0
- package/dist/index.js.map +2 -2
- package/package.json +1 -1
- package/dist/go-to-k-cdkd-0.26.0.tgz +0 -0
|
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
|
*
|