@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
80 lines • 2.74 kB
JavaScript
;
// *** 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.getCipherTextOutput = exports.getCipherText = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* The KMS ciphertext data source allows you to encrypt plaintext into ciphertext
* by using an AWS KMS customer master key. The value returned by this data source
* changes every apply. For a stable ciphertext value, see the `aws.kms.Ciphertext`
* resource.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const oauthConfig = new aws.kms.Key("oauth_config", {
* description: "oauth config",
* isEnabled: true,
* });
* const oauth = aws.kms.getCipherTextOutput({
* keyId: oauthConfig.keyId,
* plaintext: `{
* \\"client_id\\": \\"e587dbae22222f55da22\\",
* \\"client_secret\\": \\"8289575d00000ace55e1815ec13673955721b8a5\\"
* }
* `,
* });
* ```
*/
function getCipherText(args, opts) {
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invoke("aws:kms/getCipherText:getCipherText", {
"context": args.context,
"keyId": args.keyId,
"plaintext": args.plaintext,
"region": args.region,
}, opts);
}
exports.getCipherText = getCipherText;
/**
* The KMS ciphertext data source allows you to encrypt plaintext into ciphertext
* by using an AWS KMS customer master key. The value returned by this data source
* changes every apply. For a stable ciphertext value, see the `aws.kms.Ciphertext`
* resource.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const oauthConfig = new aws.kms.Key("oauth_config", {
* description: "oauth config",
* isEnabled: true,
* });
* const oauth = aws.kms.getCipherTextOutput({
* keyId: oauthConfig.keyId,
* plaintext: `{
* \\"client_id\\": \\"e587dbae22222f55da22\\",
* \\"client_secret\\": \\"8289575d00000ace55e1815ec13673955721b8a5\\"
* }
* `,
* });
* ```
*/
function getCipherTextOutput(args, opts) {
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invokeOutput("aws:kms/getCipherText:getCipherText", {
"context": args.context,
"keyId": args.keyId,
"plaintext": args.plaintext,
"region": args.region,
}, opts);
}
exports.getCipherTextOutput = getCipherTextOutput;
//# sourceMappingURL=getCipherText.js.map