import * as pulumi from "@pulumi/pulumi"; /** * Get the service account from a project. For more information see * the official [API](https://cloud.google.com/compute/docs/access/service-accounts) documentation. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const objectViewer = gcp.serviceaccount.getAccount({ * accountId: "object-viewer", * }); * ``` * * ### Save Key In Kubernetes Secret * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * import * as kubernetes from "@pulumi/kubernetes"; * import * as std from "@pulumi/std"; * * const myaccount = gcp.serviceaccount.getAccount({ * accountId: "myaccount-id", * }); * const mykey = new gcp.serviceaccount.Key("mykey", {serviceAccountId: myaccount.then(myaccount => myaccount.name)}); * const google_application_credentials = new kubernetes.index.Secret("google-application-credentials", { * metadata: [{ * name: "google-application-credentials", * }], * data: { * json: std.base64decodeOutput({ * input: mykey.privateKey, * }).result, * }, * }); * ``` */ export declare function getAccount(args: GetAccountArgs, opts?: pulumi.InvokeOptions): Promise; /** * A collection of arguments for invoking getAccount. */ export interface GetAccountArgs { /** * The Google service account ID. This be one of: * * * The name of the service account within the project (e.g. `my-service`) * * * The fully-qualified path to a service account resource (e.g. * `projects/my-project/serviceAccounts/...`) * * * The email address of the service account (e.g. * `my-service@my-project.iam.gserviceaccount.com`) */ accountId: string; /** * The ID of the project that the service account is present in. * Defaults to the provider project configuration. */ project?: string; } /** * A collection of values returned by getAccount. */ export interface GetAccountResult { readonly accountId: string; /** * Whether a service account is disabled or not. */ readonly disabled: boolean; /** * The display name for the service account. */ readonly displayName: string; /** * 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: string; /** * The provider-assigned unique ID for this managed resource. */ readonly id: 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: string; /** * The fully-qualified name of the service account. */ readonly name: string; readonly project?: string; /** * The unique id of the service account. */ readonly uniqueId: string; } /** * Get the service account from a project. For more information see * the official [API](https://cloud.google.com/compute/docs/access/service-accounts) documentation. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const objectViewer = gcp.serviceaccount.getAccount({ * accountId: "object-viewer", * }); * ``` * * ### Save Key In Kubernetes Secret * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * import * as kubernetes from "@pulumi/kubernetes"; * import * as std from "@pulumi/std"; * * const myaccount = gcp.serviceaccount.getAccount({ * accountId: "myaccount-id", * }); * const mykey = new gcp.serviceaccount.Key("mykey", {serviceAccountId: myaccount.then(myaccount => myaccount.name)}); * const google_application_credentials = new kubernetes.index.Secret("google-application-credentials", { * metadata: [{ * name: "google-application-credentials", * }], * data: { * json: std.base64decodeOutput({ * input: mykey.privateKey, * }).result, * }, * }); * ``` */ export declare function getAccountOutput(args: GetAccountOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output; /** * A collection of arguments for invoking getAccount. */ export interface GetAccountOutputArgs { /** * The Google service account ID. This be one of: * * * The name of the service account within the project (e.g. `my-service`) * * * The fully-qualified path to a service account resource (e.g. * `projects/my-project/serviceAccounts/...`) * * * The email address of the service account (e.g. * `my-service@my-project.iam.gserviceaccount.com`) */ accountId: pulumi.Input; /** * The ID of the project that the service account is present in. * Defaults to the provider project configuration. */ project?: pulumi.Input; }