@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
60 lines • 2.64 kB
JavaScript
;
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.getAccountKeyOutput = exports.getAccountKey = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Get service account public key. For more information, see [the official documentation](https://cloud.google.com/iam/docs/creating-managing-service-account-keys) and [API](https://cloud.google.com/iam/reference/rest/v1/projects.serviceAccounts.keys/get).
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const myaccount = new gcp.serviceaccount.Account("myaccount", {accountId: "dev-foo-account"});
* const mykeyKey = new gcp.serviceaccount.Key("mykey", {serviceAccountId: myaccount.name});
* const mykey = gcp.serviceaccount.getAccountKeyOutput({
* name: mykeyKey.name,
* publicKeyType: "TYPE_X509_PEM_FILE",
* });
* ```
*/
function getAccountKey(args, opts) {
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invoke("gcp:serviceaccount/getAccountKey:getAccountKey", {
"name": args.name,
"project": args.project,
"publicKeyType": args.publicKeyType,
}, opts);
}
exports.getAccountKey = getAccountKey;
/**
* Get service account public key. For more information, see [the official documentation](https://cloud.google.com/iam/docs/creating-managing-service-account-keys) and [API](https://cloud.google.com/iam/reference/rest/v1/projects.serviceAccounts.keys/get).
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const myaccount = new gcp.serviceaccount.Account("myaccount", {accountId: "dev-foo-account"});
* const mykeyKey = new gcp.serviceaccount.Key("mykey", {serviceAccountId: myaccount.name});
* const mykey = gcp.serviceaccount.getAccountKeyOutput({
* name: mykeyKey.name,
* publicKeyType: "TYPE_X509_PEM_FILE",
* });
* ```
*/
function getAccountKeyOutput(args, opts) {
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invokeOutput("gcp:serviceaccount/getAccountKey:getAccountKey", {
"name": args.name,
"project": args.project,
"publicKeyType": args.publicKeyType,
}, opts);
}
exports.getAccountKeyOutput = getAccountKeyOutput;
//# sourceMappingURL=getAccountKey.js.map