@pattform/api-kit 2.6.0 → 2.6.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.
|
@@ -22,6 +22,6 @@ export interface GcpProjectComponentArgs {
|
|
|
22
22
|
services?: string[];
|
|
23
23
|
deployServiceAccountId?: string;
|
|
24
24
|
deployRoles?: string[];
|
|
25
|
-
|
|
25
|
+
tokenCreatorMembers?: pulumi.Input<string>[];
|
|
26
26
|
importProjectId?: string;
|
|
27
27
|
}
|
|
@@ -38,13 +38,14 @@ class GcpProjectComponent extends pulumi.ComponentResource {
|
|
|
38
38
|
member: pulumi.interpolate `serviceAccount:${deploySa.email}`,
|
|
39
39
|
}, { parent: deploySa });
|
|
40
40
|
}
|
|
41
|
-
//
|
|
42
|
-
//
|
|
43
|
-
//
|
|
44
|
-
|
|
45
|
-
|
|
41
|
+
// Trust hop, mirroring OrganizationAccountAccessRole on AWS: the base
|
|
42
|
+
// automation identity (pattform-infra, opened via the shared Common
|
|
43
|
+
// gcp-login) may mint tokens for this project's deploy SA. Stacks then
|
|
44
|
+
// set gcp:impersonateServiceAccount to hop in, no per-client ESC auth.
|
|
45
|
+
((_e = args.tokenCreatorMembers) !== null && _e !== void 0 ? _e : []).forEach((member, i) => {
|
|
46
|
+
new gcp.serviceaccount.IAMMember(`${name}-deploy-token-creator-${i}`, {
|
|
46
47
|
serviceAccountId: deploySa.name,
|
|
47
|
-
role: "roles/iam.
|
|
48
|
+
role: "roles/iam.serviceAccountTokenCreator",
|
|
48
49
|
member: member,
|
|
49
50
|
}, { parent: deploySa });
|
|
50
51
|
});
|