UNPKG

@pulumi/aws

Version:

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

121 lines (120 loc) 3.79 kB
import * as pulumi from "@pulumi/pulumi"; /** * 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\\" * } * `, * }); * ``` */ export declare function getCipherText(args: GetCipherTextArgs, opts?: pulumi.InvokeOptions): Promise<GetCipherTextResult>; /** * A collection of arguments for invoking getCipherText. */ export interface GetCipherTextArgs { /** * An optional mapping that makes up the encryption context. */ context?: { [key: string]: string; }; /** * Globally unique key ID for the customer master key. */ keyId: string; /** * Data to be encrypted. Note that this may show up in logs, and it will be stored in the state file. */ plaintext: string; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ region?: string; } /** * A collection of values returned by getCipherText. */ export interface GetCipherTextResult { /** * Base64 encoded ciphertext */ readonly ciphertextBlob: string; readonly context?: { [key: string]: string; }; /** * The provider-assigned unique ID for this managed resource. */ readonly id: string; readonly keyId: string; readonly plaintext: string; readonly region: string; } /** * 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\\" * } * `, * }); * ``` */ export declare function getCipherTextOutput(args: GetCipherTextOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetCipherTextResult>; /** * A collection of arguments for invoking getCipherText. */ export interface GetCipherTextOutputArgs { /** * An optional mapping that makes up the encryption context. */ context?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; /** * Globally unique key ID for the customer master key. */ keyId: pulumi.Input<string>; /** * Data to be encrypted. Note that this may show up in logs, and it will be stored in the state file. */ plaintext: pulumi.Input<string>; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ region?: pulumi.Input<string>; }