GlobalClusterArgs

data class GlobalClusterArgs(val deletionProtection: Output<Boolean>? = null, val engine: Output<String>? = null, val engineVersion: Output<String>? = null, val globalClusterIdentifier: Output<String>? = null, val sourceDbClusterIdentifier: Output<String>? = null, val storageEncrypted: Output<Boolean>? = null) : ConvertibleToJava<GlobalClusterArgs>

Manages a Neptune Global Cluster. A global cluster consists of one primary region and up to five read-only secondary regions. You issue write operations directly to the primary cluster in the primary region and Amazon Neptune automatically replicates the data to the secondary regions using dedicated infrastructure. More information about Neptune Global Clusters can be found in the Neptune User Guide.

Example Usage

New Neptune Global Cluster

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.neptune.GlobalCluster;
import com.pulumi.aws.neptune.GlobalClusterArgs;
import com.pulumi.aws.neptune.Cluster;
import com.pulumi.aws.neptune.ClusterArgs;
import com.pulumi.aws.neptune.ClusterInstance;
import com.pulumi.aws.neptune.ClusterInstanceArgs;
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 primary = new Provider("primary", ProviderArgs.builder()
.region("us-east-2")
.build());
var secondary = new Provider("secondary", ProviderArgs.builder()
.region("us-east-1")
.build());
var example = new GlobalCluster("example", GlobalClusterArgs.builder()
.globalClusterIdentifier("global-test")
.engine("neptune")
.engineVersion("1.2.0.0")
.build());
var primaryCluster = new Cluster("primaryCluster", ClusterArgs.builder()
.engine(example.engine())
.engineVersion(example.engineVersion())
.clusterIdentifier("test-primary-cluster")
.globalClusterIdentifier(example.id())
.neptuneSubnetGroupName("default")
.build(), CustomResourceOptions.builder()
.provider(aws.primary())
.build());
var primaryClusterInstance = new ClusterInstance("primaryClusterInstance", ClusterInstanceArgs.builder()
.engine(example.engine())
.engineVersion(example.engineVersion())
.identifier("test-primary-cluster-instance")
.clusterIdentifier(primaryCluster.id())
.instanceClass("db.r5.large")
.neptuneSubnetGroupName("default")
.build(), CustomResourceOptions.builder()
.provider(aws.primary())
.build());
var secondaryCluster = new Cluster("secondaryCluster", ClusterArgs.builder()
.engine(example.engine())
.engineVersion(example.engineVersion())
.clusterIdentifier("test-secondary-cluster")
.globalClusterIdentifier(example.id())
.neptuneSubnetGroupName("default")
.build(), CustomResourceOptions.builder()
.provider(aws.secondary())
.build());
var secondaryClusterInstance = new ClusterInstance("secondaryClusterInstance", ClusterInstanceArgs.builder()
.engine(example.engine())
.engineVersion(example.engineVersion())
.identifier("test-secondary-cluster-instance")
.clusterIdentifier(secondaryCluster.id())
.instanceClass("db.r5.large")
.neptuneSubnetGroupName("default")
.build(), CustomResourceOptions.builder()
.provider(aws.secondary())
.dependsOn(primaryClusterInstance)
.build());
}
}

New Global Cluster From Existing DB Cluster

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.neptune.Cluster;
import com.pulumi.aws.neptune.GlobalCluster;
import com.pulumi.aws.neptune.GlobalClusterArgs;
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 exampleCluster = new Cluster("exampleCluster");
var exampleGlobalCluster = new GlobalCluster("exampleGlobalCluster", GlobalClusterArgs.builder()
.globalClusterIdentifier("example")
.sourceDbClusterIdentifier(exampleCluster.arn())
.build());
}
}

Import

aws_neptune_global_cluster can be imported by using the Global Cluster identifier, e.g.

$ pulumi import aws:neptune/globalCluster:GlobalCluster example example

Certain resource arguments, like source_db_cluster_identifier, do not have an API method for reading the information after creation. If the argument is set in configuration on an imported resource, the provider will always show a difference. To workaround this behavior, either omit the argument from configuration or use ignore_changes to hide the difference, e.g. terraform resource "aws_neptune_global_cluster" "example" {

... other configuration ...

There is no API for reading source_db_cluster_identifier

lifecycle { ignore_changes = source_db_cluster_identifier } }

Constructors

Link copied to clipboard
constructor(deletionProtection: Output<Boolean>? = null, engine: Output<String>? = null, engineVersion: Output<String>? = null, globalClusterIdentifier: Output<String>? = null, sourceDbClusterIdentifier: Output<String>? = null, storageEncrypted: Output<Boolean>? = null)

Properties

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

If the Global Cluster should have deletion protection enabled. The database can't be deleted when this value is set to true. The default is false.

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

Name of the database engine to be used for this DB cluster. The provider will only perform drift detection if a configuration value is provided. Current Valid values: neptune. Conflicts with source_db_cluster_identifier.

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

Engine version of the global database. Upgrading the engine version will result in all cluster members being immediately updated and will.

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

The global cluster identifier.

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

Amazon Resource Name (ARN) to use as the primary DB Cluster of the Global Cluster on creation. The provider cannot perform drift detection of this value.

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

Specifies whether the DB cluster is encrypted. The default is false unless source_db_cluster_identifier is specified and encrypted. The provider will only perform drift detection if a configuration value is provided.

Functions

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