CiphertextArgs

data class CiphertextArgs(val context: Output<Map<String, String>>? = null, val keyId: Output<String>? = null, val plaintext: Output<String>? = null) : ConvertibleToJava<CiphertextArgs>

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.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.kms.Key;
import com.pulumi.aws.kms.KeyArgs;
import com.pulumi.aws.kms.Ciphertext;
import com.pulumi.aws.kms.CiphertextArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var oauthConfig = new Key("oauthConfig", KeyArgs.builder()
.description("oauth config")
.isEnabled(true)
.build());
var oauth = new Ciphertext("oauth", CiphertextArgs.builder()
.keyId(oauthConfig.keyId())
.plaintext("""
{
"client_id": "e587dbae22222f55da22",
"client_secret": "8289575d00000ace55e1815ec13673955721b8a5"
}
""")
.build());
}
}

Constructors

Link copied to clipboard
constructor(context: Output<Map<String, String>>? = null, keyId: Output<String>? = null, plaintext: Output<String>? = null)

Properties

Link copied to clipboard
val context: Output<Map<String, String>>? = null

An optional mapping that makes up the encryption context.

Link copied to clipboard
val keyId: Output<String>? = null

Globally unique key ID for the customer master key.

Link copied to clipboard
val plaintext: Output<String>? = null

Data to be encrypted. Note that this may show up in logs, and it will be stored in the state file.

Functions

Link copied to clipboard
open override fun toJava(): CiphertextArgs