Class Ciphertext
The KMS ciphertext resource allows you to encrypt plaintext into ciphertext
by using an AWS KMS customer master key. The value returned by this resource
is stable across every apply. For a changing ciphertext value each apply, see
the aws.kms.Ciphertext data source.
Note: All arguments including the plaintext be stored in the raw state as plain-text. Read more about sensitive data in state.
Example Usage
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var oauthConfig = new Aws.Kms.Key("oauthConfig", new Aws.Kms.KeyArgs
{
Description = "oauth config",
IsEnabled = true,
});
var oauth = new Aws.Kms.Ciphertext("oauth", new Aws.Kms.CiphertextArgs
{
KeyId = oauthConfig.KeyId,
Plaintext = @"{
""client_id"": ""e587dbae22222f55da22"",
""client_secret"": ""8289575d00000ace55e1815ec13673955721b8a5""
}
",
});
}
}
Inherited Members
Namespace: Pulumi.Aws.Kms
Assembly: Pulumi.Aws.dll
Syntax
public class Ciphertext : CustomResource
Constructors
View SourceCiphertext(String, CiphertextArgs, CustomResourceOptions)
Create a Ciphertext resource with the given unique name, arguments, and options.
Declaration
public Ciphertext(string name, CiphertextArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| CiphertextArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceCiphertextBlob
Base64 encoded ciphertext
Declaration
public Output<string> CiphertextBlob { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Context
An optional mapping that makes up the encryption context.
Declaration
public Output<ImmutableDictionary<string, string>> Context { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.String>> |
KeyId
Globally unique key ID for the customer master key.
Declaration
public Output<string> KeyId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Plaintext
Data to be encrypted. Note that this may show up in logs, and it will be stored in the state file.
Declaration
public Output<string> Plaintext { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, CiphertextState, CustomResourceOptions)
Get an existing Ciphertext resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static Ciphertext Get(string name, Input<string> id, CiphertextState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| CiphertextState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| Ciphertext |