UNPKG

@pulumi/gcp

Version:

A Pulumi package for creating and managing Google Cloud Platform resources.

74 lines 3.22 kB
"use strict"; // *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.getDefaultServiceAccountOutput = exports.getDefaultServiceAccount = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Get the email address of a project's unique BigQuery service account. * * Each Google Cloud project has a unique service account used by BigQuery. When using * BigQuery with [customer-managed encryption keys](https://cloud.google.com/bigquery/docs/customer-managed-encryption), * this account needs to be granted the * `cloudkms.cryptoKeyEncrypterDecrypter` IAM role on the customer-managed Cloud KMS key used to protect the data. * * For more information see * [the API reference](https://cloud.google.com/bigquery/docs/reference/rest/v2/projects/getServiceAccount). * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const bqSa = gcp.bigquery.getDefaultServiceAccount({}); * const keySaUser = new gcp.kms.CryptoKeyIAMMember("key_sa_user", { * cryptoKeyId: key.id, * role: "roles/cloudkms.cryptoKeyEncrypterDecrypter", * member: bqSa.then(bqSa => `serviceAccount:${bqSa.email}`), * }); * ``` */ function getDefaultServiceAccount(args, opts) { args = args || {}; opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invoke("gcp:bigquery/getDefaultServiceAccount:getDefaultServiceAccount", { "project": args.project, }, opts); } exports.getDefaultServiceAccount = getDefaultServiceAccount; /** * Get the email address of a project's unique BigQuery service account. * * Each Google Cloud project has a unique service account used by BigQuery. When using * BigQuery with [customer-managed encryption keys](https://cloud.google.com/bigquery/docs/customer-managed-encryption), * this account needs to be granted the * `cloudkms.cryptoKeyEncrypterDecrypter` IAM role on the customer-managed Cloud KMS key used to protect the data. * * For more information see * [the API reference](https://cloud.google.com/bigquery/docs/reference/rest/v2/projects/getServiceAccount). * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const bqSa = gcp.bigquery.getDefaultServiceAccount({}); * const keySaUser = new gcp.kms.CryptoKeyIAMMember("key_sa_user", { * cryptoKeyId: key.id, * role: "roles/cloudkms.cryptoKeyEncrypterDecrypter", * member: bqSa.then(bqSa => `serviceAccount:${bqSa.email}`), * }); * ``` */ function getDefaultServiceAccountOutput(args, opts) { args = args || {}; opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invokeOutput("gcp:bigquery/getDefaultServiceAccount:getDefaultServiceAccount", { "project": args.project, }, opts); } exports.getDefaultServiceAccountOutput = getDefaultServiceAccountOutput; //# sourceMappingURL=getDefaultServiceAccount.js.map