@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
123 lines (122 loc) • 6 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Ensures that a member:role pairing does not exist in a project's IAM policy.
*
* On create, this resource will modify the policy to remove the `member` from the
* `role`. If the membership is ever re-added, the next refresh will clear this
* resource from state, proposing re-adding it to correct the membership. Import is
* not supported- this resource will acquire the current policy and modify it as
* part of creating the resource.
*
* This resource will conflict with `gcp.projects.IAMPolicy` and
* `gcp.projects.IAMBinding` resources that share a role, as well as
* `gcp.projects.IAMMember` resources that target the same membership. When
* multiple resources conflict the final state is not guaranteed to include or omit
* the membership. Subsequent `pulumi up` calls will always show a diff
* until the configuration is corrected.
*
* For more information see
* [the official documentation](https://cloud.google.com/iam/docs/granting-changing-revoking-access)
* and
* [API reference](https://cloud.google.com/resource-manager/reference/rest/v1/projects/setIamPolicy).
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const targetProject = gcp.organizations.getProject({});
* const foo = new gcp.projects.IamMemberRemove("foo", {
* role: "roles/editor",
* project: targetProjectGoogleProject.projectId,
* member: `serviceAccount:${targetProjectGoogleProject.number}-compute@developer.gserviceaccount.com`,
* });
* ```
*/
export declare class IamMemberRemove extends pulumi.CustomResource {
/**
* Get an existing IamMemberRemove 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?: IamMemberRemoveState, opts?: pulumi.CustomResourceOptions): IamMemberRemove;
/**
* Returns true if the given object is an instance of IamMemberRemove. 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 IamMemberRemove;
/**
* The IAM principal that should not have the target role.
* Each entry can have one of the following values:
* * **user:{emailid}**: An email address that represents a specific Google account. For example, alice@gmail.com or joe@example.com.
* * **serviceAccount:{emailid}**: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com.
* * **group:{emailid}**: An email address that represents a Google group. For example, admins@example.com.
* * **domain:{domain}**: A G Suite domain (primary, instead of alias) name that represents all the users of that domain. For example, google.com or example.com.
*/
readonly member: pulumi.Output<string>;
/**
* The project id of the target project.
*/
readonly project: pulumi.Output<string>;
/**
* The target role that should be removed.
*/
readonly role: pulumi.Output<string>;
/**
* Create a IamMemberRemove 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: IamMemberRemoveArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering IamMemberRemove resources.
*/
export interface IamMemberRemoveState {
/**
* The IAM principal that should not have the target role.
* Each entry can have one of the following values:
* * **user:{emailid}**: An email address that represents a specific Google account. For example, alice@gmail.com or joe@example.com.
* * **serviceAccount:{emailid}**: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com.
* * **group:{emailid}**: An email address that represents a Google group. For example, admins@example.com.
* * **domain:{domain}**: A G Suite domain (primary, instead of alias) name that represents all the users of that domain. For example, google.com or example.com.
*/
member?: pulumi.Input<string>;
/**
* The project id of the target project.
*/
project?: pulumi.Input<string>;
/**
* The target role that should be removed.
*/
role?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a IamMemberRemove resource.
*/
export interface IamMemberRemoveArgs {
/**
* The IAM principal that should not have the target role.
* Each entry can have one of the following values:
* * **user:{emailid}**: An email address that represents a specific Google account. For example, alice@gmail.com or joe@example.com.
* * **serviceAccount:{emailid}**: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com.
* * **group:{emailid}**: An email address that represents a Google group. For example, admins@example.com.
* * **domain:{domain}**: A G Suite domain (primary, instead of alias) name that represents all the users of that domain. For example, google.com or example.com.
*/
member: pulumi.Input<string>;
/**
* The project id of the target project.
*/
project: pulumi.Input<string>;
/**
* The target role that should be removed.
*/
role: pulumi.Input<string>;
}