TableReplicaArgs

data class TableReplicaArgs(val globalTableArn: Output<String>? = null, val kmsKeyArn: Output<String>? = null, val pointInTimeRecovery: Output<Boolean>? = null, val tableClassOverride: Output<String>? = null, val tags: Output<Map<String, String>>? = null) : ConvertibleToJava<TableReplicaArgs>

Provides a DynamoDB table replica resource for DynamoDB Global Tables V2 (version 2019.11.21).

Note: Use lifecycle ignore_changes for replica in the associated aws.dynamodb.Table configuration. Note: Do not use the replica configuration block of aws.dynamodb.Table together with this resource as the two configuration options are mutually exclusive.

Example Usage

Basic Example

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.Provider;
import com.pulumi.aws.ProviderArgs;
import com.pulumi.aws.dynamodb.Table;
import com.pulumi.aws.dynamodb.TableArgs;
import com.pulumi.aws.dynamodb.inputs.TableAttributeArgs;
import com.pulumi.aws.dynamodb.TableReplica;
import com.pulumi.aws.dynamodb.TableReplicaArgs;
import com.pulumi.resources.CustomResourceOptions;
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 main = new Provider("main", ProviderArgs.builder()
.region("us-west-2")
.build());
var alt = new Provider("alt", ProviderArgs.builder()
.region("us-east-2")
.build());
var exampleTable = new Table("exampleTable", TableArgs.builder()
.hashKey("BrodoBaggins")
.billingMode("PAY_PER_REQUEST")
.streamEnabled(true)
.streamViewType("NEW_AND_OLD_IMAGES")
.attributes(TableAttributeArgs.builder()
.name("BrodoBaggins")
.type("S")
.build())
.build(), CustomResourceOptions.builder()
.provider("aws.main")
.build());
var exampleTableReplica = new TableReplica("exampleTableReplica", TableReplicaArgs.builder()
.globalTableArn(exampleTable.arn())
.tags(Map.ofEntries(
Map.entry("Name", "IZPAWS"),
Map.entry("Pozo", "Amargo")
))
.build(), CustomResourceOptions.builder()
.provider("aws.alt")
.build());
}
}

Import

DynamoDB table replicas can be imported using the table-name:main-region, e.g.,

$ pulumi import aws:dynamodb/tableReplica:TableReplica example TestTable:us-west-2

Constructors

Link copied to clipboard
constructor(globalTableArn: Output<String>? = null, kmsKeyArn: Output<String>? = null, pointInTimeRecovery: Output<Boolean>? = null, tableClassOverride: Output<String>? = null, tags: Output<Map<String, String>>? = null)

Properties

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

ARN of the main or global table which this resource will replicate. Optional arguments:

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

ARN of the CMK that should be used for the AWS KMS encryption. This argument should only be used if the key is different from the default KMS-managed DynamoDB key, alias/aws/dynamodb. Note: This attribute will not be populated with the ARN of default keys.

Link copied to clipboard
val pointInTimeRecovery: Output<Boolean>? = null

Whether to enable Point In Time Recovery for the replica. Default is false.

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

Storage class of the table replica. Valid values are STANDARD and STANDARD_INFREQUENT_ACCESS. If not used, the table replica will use the same class as the global table.

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

Map of tags to populate on the created table. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

Functions

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