@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
220 lines • 9.65 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Allows management of a Google Cloud service account.
*
* * [API documentation](https://cloud.google.com/iam/reference/rest/v1/projects.serviceAccounts)
* * How-to Guides
* * [Official Documentation](https://cloud.google.com/compute/docs/access/service-accounts)
*
* > **Warning:** If you delete and recreate a service account, you must reapply any IAM roles that it had before.
*
* > Creation of service accounts is eventually consistent, and that can lead to
* errors when you try to apply ACLs to service accounts immediately after
* creation.
*
* ## Example Usage
*
* This snippet creates a service account in a project.
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const serviceAccount = new gcp.serviceaccount.Account("service_account", {
* accountId: "service-account-id",
* displayName: "Service Account",
* });
* ```
*/
export declare class Account extends pulumi.CustomResource {
/**
* Get an existing Account 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?: AccountState, opts?: pulumi.CustomResourceOptions): Account;
/**
* Returns true if the given object is an instance of Account. 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 Account;
/**
* The account id that is used to generate the service
* account email address and a stable unique id. It is unique within a project,
* must be 6-30 characters long, and match the regular expression `a-z`
* to comply with RFC1035. Changing this forces a new service account to be created.
*/
readonly accountId: pulumi.Output<string>;
/**
* If set to true, skip service account creation if a service account with the same email already exists.
*/
readonly createIgnoreAlreadyExists: pulumi.Output<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.
*/
readonly deletionPolicy: pulumi.Output<string>;
/**
* A text description of the service account.
* Must be less than or equal to 256 UTF-8 bytes.
*/
readonly description: pulumi.Output<string | undefined>;
/**
* Whether a service account is disabled or not. Defaults to `false`. This field has no effect during creation.
* Must be set after creation to disable a service account.
*/
readonly disabled: pulumi.Output<boolean | undefined>;
/**
* The display name for the service account.
* Can be updated without creating a new resource.
*/
readonly displayName: pulumi.Output<string | undefined>;
/**
* The e-mail address of the service account. This value
* should be referenced from any `gcp.organizations.getIAMPolicy` data sources
* that would grant the service account privileges.
*/
readonly email: pulumi.Output<string>;
/**
* The Identity of the service account in the form `serviceAccount:{email}`. This value is often used to refer to the service account in order to grant IAM permissions.
*/
readonly member: pulumi.Output<string>;
/**
* The fully-qualified name of the service account.
*/
readonly name: pulumi.Output<string>;
/**
* The ID of the project that the service account will be created in.
* Defaults to the provider project configuration.
*/
readonly project: pulumi.Output<string>;
/**
* The unique id of the service account.
*/
readonly uniqueId: pulumi.Output<string>;
/**
* Create a Account 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?: AccountArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering Account resources.
*/
export interface AccountState {
/**
* The account id that is used to generate the service
* account email address and a stable unique id. It is unique within a project,
* must be 6-30 characters long, and match the regular expression `a-z`
* to comply with RFC1035. Changing this forces a new service account to be created.
*/
accountId?: pulumi.Input<string | undefined>;
/**
* If set to true, skip service account creation if a service account with the same email already exists.
*/
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>;
/**
* A text description of the service account.
* Must be less than or equal to 256 UTF-8 bytes.
*/
description?: pulumi.Input<string | undefined>;
/**
* Whether a service account is disabled or not. Defaults to `false`. This field has no effect during creation.
* Must be set after creation to disable a service account.
*/
disabled?: pulumi.Input<boolean | undefined>;
/**
* The display name for the service account.
* Can be updated without creating a new resource.
*/
displayName?: pulumi.Input<string | undefined>;
/**
* The e-mail address of the service account. This value
* should be referenced from any `gcp.organizations.getIAMPolicy` data sources
* that would grant the service account privileges.
*/
email?: pulumi.Input<string | undefined>;
/**
* The Identity of the service account in the form `serviceAccount:{email}`. This value is often used to refer to the service account in order to grant IAM permissions.
*/
member?: pulumi.Input<string | undefined>;
/**
* The fully-qualified name of the service account.
*/
name?: pulumi.Input<string | undefined>;
/**
* The ID of the project that the service account will be created in.
* Defaults to the provider project configuration.
*/
project?: pulumi.Input<string | undefined>;
/**
* The unique id of the service account.
*/
uniqueId?: pulumi.Input<string | undefined>;
}
/**
* The set of arguments for constructing a Account resource.
*/
export interface AccountArgs {
/**
* The account id that is used to generate the service
* account email address and a stable unique id. It is unique within a project,
* must be 6-30 characters long, and match the regular expression `a-z`
* to comply with RFC1035. Changing this forces a new service account to be created.
*/
accountId?: pulumi.Input<string | undefined>;
/**
* If set to true, skip service account creation if a service account with the same email already exists.
*/
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>;
/**
* A text description of the service account.
* Must be less than or equal to 256 UTF-8 bytes.
*/
description?: pulumi.Input<string | undefined>;
/**
* Whether a service account is disabled or not. Defaults to `false`. This field has no effect during creation.
* Must be set after creation to disable a service account.
*/
disabled?: pulumi.Input<boolean | undefined>;
/**
* The display name for the service account.
* Can be updated without creating a new resource.
*/
displayName?: pulumi.Input<string | undefined>;
/**
* The ID of the project that the service account will be created in.
* Defaults to the provider project configuration.
*/
project?: pulumi.Input<string | undefined>;
}
//# sourceMappingURL=account.d.ts.map