@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
270 lines • 10.5 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
/**
* A Membership defines a relationship between a Group and an entity belonging to that Group, referred to as a "member".
*
* To get more information about GroupMembership, see:
*
* * [API documentation](https://cloud.google.com/identity/docs/reference/rest/v1/groups.memberships)
* * How-to Guides
* * [Official Documentation](https://cloud.google.com/identity/docs/how-to/memberships-google-groups)
*
* > **Warning:** If you are using User ADCs (Application Default Credentials) with this resource,
* you must specify a `billingProject` and set `userProjectOverride` to true
* in the provider configuration. Otherwise the Cloud Identity API will return a 403 error.
* Your account must have the `serviceusage.services.use` permission on the
* `billingProject` you defined.
*
* ## Example Usage
*
* ### Cloud Identity Group Membership
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const group = new gcp.cloudidentity.Group("group", {
* displayName: "my-identity-group",
* parent: "customers/A01b123xz",
* groupKey: {
* id: "my-identity-group@example.com",
* },
* labels: {
* "cloudidentity.googleapis.com/groups.discussion_forum": "",
* },
* });
* const child_group = new gcp.cloudidentity.Group("child-group", {
* displayName: "my-identity-group-child",
* parent: "customers/A01b123xz",
* groupKey: {
* id: "my-identity-group-child@example.com",
* },
* labels: {
* "cloudidentity.googleapis.com/groups.discussion_forum": "",
* },
* });
* const cloudIdentityGroupMembershipBasic = new gcp.cloudidentity.GroupMembership("cloud_identity_group_membership_basic", {
* group: group.id,
* preferredMemberKey: {
* id: child_group.groupKey.apply(groupKey => groupKey.id),
* },
* roles: [{
* name: "MEMBER",
* }],
* });
* ```
* ### Cloud Identity Group Membership User
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const group = new gcp.cloudidentity.Group("group", {
* displayName: "my-identity-group",
* parent: "customers/A01b123xz",
* groupKey: {
* id: "my-identity-group@example.com",
* },
* labels: {
* "cloudidentity.googleapis.com/groups.discussion_forum": "",
* },
* });
* const cloudIdentityGroupMembershipBasic = new gcp.cloudidentity.GroupMembership("cloud_identity_group_membership_basic", {
* group: group.id,
* preferredMemberKey: {
* id: "cloud_identity_user@example.com",
* },
* roles: [
* {
* name: "MEMBER",
* },
* {
* name: "MANAGER",
* },
* ],
* });
* ```
*
* ## Import
*
* GroupMembership can be imported using any of these accepted formats:
*
* * `{{name}}`
*
* When using the `pulumi import` command, GroupMembership can be imported using one of the formats above. For example:
*
* ```sh
* $ pulumi import gcp:cloudidentity/groupMembership:GroupMembership default {{name}}
* ```
*/
export declare class GroupMembership extends pulumi.CustomResource {
/**
* Get an existing GroupMembership resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: GroupMembershipState, opts?: pulumi.CustomResourceOptions): GroupMembership;
/**
* Returns true if the given object is an instance of GroupMembership. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is GroupMembership;
/**
* If set to true, skip group member creation if a membership with the same name already exists. Defaults to false.
*/
readonly createIgnoreAlreadyExists: pulumi.Output<boolean | undefined>;
/**
* The time when the Membership was created.
*/
readonly createTime: pulumi.Output<string>;
/**
* Whether Terraform will be prevented from destroying the resource. Defaults to DELETE.
* When a 'terraform destroy' or 'pulumi up' would delete the resource,
* the command will fail if this field is set to "PREVENT" in Terraform state.
* When set to "ABANDON", the command will remove the resource from Terraform
* management without updating or deleting the resource in the API.
* When set to "DELETE", deleting the resource is allowed.
*/
readonly deletionPolicy: pulumi.Output<string>;
/**
* The name of the Group to create this membership in.
*/
readonly group: pulumi.Output<string>;
/**
* (Optional, Beta)
* EntityKey of the member.
* Structure is documented below.
*/
readonly memberKey: pulumi.Output<outputs.cloudidentity.GroupMembershipMemberKey>;
/**
* The resource name of the Membership, of the form groups/{group_id}/memberships/{membership_id}.
*/
readonly name: pulumi.Output<string>;
/**
* EntityKey of the member.
* Structure is documented below.
*/
readonly preferredMemberKey: pulumi.Output<outputs.cloudidentity.GroupMembershipPreferredMemberKey>;
/**
* The MembershipRoles that apply to the Membership.
* Must not contain duplicate MembershipRoles with the same name.
* Structure is documented below.
*/
readonly roles: pulumi.Output<outputs.cloudidentity.GroupMembershipRole[]>;
/**
* The type of the membership.
*/
readonly type: pulumi.Output<string>;
/**
* The time when the Membership was last updated.
*/
readonly updateTime: pulumi.Output<string>;
/**
* Create a GroupMembership resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: GroupMembershipArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering GroupMembership resources.
*/
export interface GroupMembershipState {
/**
* If set to true, skip group member creation if a membership with the same name already exists. Defaults to false.
*/
createIgnoreAlreadyExists?: pulumi.Input<boolean | undefined>;
/**
* The time when the Membership was created.
*/
createTime?: pulumi.Input<string | undefined>;
/**
* Whether Terraform will be prevented from destroying the resource. Defaults to DELETE.
* When a 'terraform destroy' or 'pulumi up' would delete the resource,
* the command will fail if this field is set to "PREVENT" in Terraform state.
* When set to "ABANDON", the command will remove the resource from Terraform
* management without updating or deleting the resource in the API.
* When set to "DELETE", deleting the resource is allowed.
*/
deletionPolicy?: pulumi.Input<string | undefined>;
/**
* The name of the Group to create this membership in.
*/
group?: pulumi.Input<string | undefined>;
/**
* (Optional, Beta)
* EntityKey of the member.
* Structure is documented below.
*/
memberKey?: pulumi.Input<inputs.cloudidentity.GroupMembershipMemberKey | undefined>;
/**
* The resource name of the Membership, of the form groups/{group_id}/memberships/{membership_id}.
*/
name?: pulumi.Input<string | undefined>;
/**
* EntityKey of the member.
* Structure is documented below.
*/
preferredMemberKey?: pulumi.Input<inputs.cloudidentity.GroupMembershipPreferredMemberKey | undefined>;
/**
* The MembershipRoles that apply to the Membership.
* Must not contain duplicate MembershipRoles with the same name.
* Structure is documented below.
*/
roles?: pulumi.Input<pulumi.Input<inputs.cloudidentity.GroupMembershipRole>[] | undefined>;
/**
* The type of the membership.
*/
type?: pulumi.Input<string | undefined>;
/**
* The time when the Membership was last updated.
*/
updateTime?: pulumi.Input<string | undefined>;
}
/**
* The set of arguments for constructing a GroupMembership resource.
*/
export interface GroupMembershipArgs {
/**
* If set to true, skip group member creation if a membership with the same name already exists. Defaults to false.
*/
createIgnoreAlreadyExists?: pulumi.Input<boolean | undefined>;
/**
* Whether Terraform will be prevented from destroying the resource. Defaults to DELETE.
* When a 'terraform destroy' or 'pulumi up' would delete the resource,
* the command will fail if this field is set to "PREVENT" in Terraform state.
* When set to "ABANDON", the command will remove the resource from Terraform
* management without updating or deleting the resource in the API.
* When set to "DELETE", deleting the resource is allowed.
*/
deletionPolicy?: pulumi.Input<string | undefined>;
/**
* The name of the Group to create this membership in.
*/
group: pulumi.Input<string>;
/**
* (Optional, Beta)
* EntityKey of the member.
* Structure is documented below.
*/
memberKey?: pulumi.Input<inputs.cloudidentity.GroupMembershipMemberKey | undefined>;
/**
* EntityKey of the member.
* Structure is documented below.
*/
preferredMemberKey?: pulumi.Input<inputs.cloudidentity.GroupMembershipPreferredMemberKey | undefined>;
/**
* The MembershipRoles that apply to the Membership.
* Must not contain duplicate MembershipRoles with the same name.
* Structure is documented below.
*/
roles: pulumi.Input<pulumi.Input<inputs.cloudidentity.GroupMembershipRole>[]>;
}
//# sourceMappingURL=groupMembership.d.ts.map