EncryptionConfigArgs

data class EncryptionConfigArgs(val keyId: Output<String>? = null, val type: Output<String>? = null) : ConvertibleToJava<EncryptionConfigArgs>

Creates and manages an AWS XRay Encryption Config.

NOTE: Removing this resource from the provider has no effect to the encryption configuration within X-Ray.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.xray.EncryptionConfig;
import com.pulumi.aws.xray.EncryptionConfigArgs;
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 example = new EncryptionConfig("example", EncryptionConfigArgs.builder()
.type("NONE")
.build());
}
}

With KMS Key

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.AwsFunctions;
import com.pulumi.aws.kms.Key;
import com.pulumi.aws.kms.KeyArgs;
import com.pulumi.aws.xray.EncryptionConfig;
import com.pulumi.aws.xray.EncryptionConfigArgs;
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) {
final var current = AwsFunctions.getCallerIdentity();
var exampleKey = new Key("exampleKey", KeyArgs.builder()
.description("Some Key")
.deletionWindowInDays(7)
.policy("""
{
"Version": "2012-10-17",
"Id": "kms-tf-1",
"Statement": [
{
"Sid": "Enable IAM User Permissions",
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::%s:root"
},
"Action": "kms:*",
"Resource": "*"
}
]
}
", current.applyValue(getCallerIdentityResult -> getCallerIdentityResult.accountId())))
.build());
var exampleEncryptionConfig = new EncryptionConfig("exampleEncryptionConfig", EncryptionConfigArgs.builder()
.type("KMS")
.keyId(exampleKey.arn())
.build());
}
}

Import

XRay Encryption Config can be imported using the region name, e.g.,

$ pulumi import aws:xray/encryptionConfig:EncryptionConfig example us-west-2

Constructors

Link copied to clipboard
fun EncryptionConfigArgs(keyId: Output<String>? = null, type: Output<String>? = null)

Functions

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

Properties

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

An AWS KMS customer master key (CMK) ARN.

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

The type of encryption. Set to KMS to use your own key for encryption. Set to NONE for default encryption.