Skip to main content

IAM Binding

Provides a IAM Binding for a project.

Examples#

Bind a user to a role#

const iamBinding = await provider.makeIamBinding({
name: "roles/editor",
properties: () => ({
members: ["user:jane@example.com"],
}),
});

Bind a service account to a role#

const serviceAccount = await provider.makeServiceAccount({
name: "sa",
properties: () => ({
accountId: "sa",
}),
});
const iamBinding = await provider.makeIamBinding({
name: "roles/editor",
dependencies: { serviceAccounts: [serviceAccount] },
properties: ({}) => ({}),
});

Example Code#

Used By#